File: green_profile_test.py

package info (click to toggle)
python-eventlet 0.26.1-7%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,916 kB
  • sloc: python: 24,898; makefile: 98
file content (9 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
import eventlet
from eventlet.green import profile
import tests


def test_green_profile_basic():
    statement = 'eventlet.sleep()'
    result = profile.Profile().runctx(statement, {'eventlet': eventlet}, {})
    assert ('profile', 0, statement) in result.timings