diff options
author | Ronan Lamy <ronan.lamy@gmail.com> | 2018-12-14 17:39:14 +0000 |
---|---|---|
committer | Ronan Lamy <ronan.lamy@gmail.com> | 2018-12-14 17:39:14 +0000 |
commit | c4d72eba339b6428d563715313c98871b62b371a (patch) | |
tree | 6d599781774720a9a47764ca9e585437258e3cf4 /extra_tests/test_vmprof_greenlet.py | |
parent | Update to cffi/448af882f47e (diff) | |
download | pypy-c4d72eba339b6428d563715313c98871b62b371a.tar.gz pypy-c4d72eba339b6428d563715313c98871b62b371a.tar.bz2 pypy-c4d72eba339b6428d563715313c98871b62b371a.zip |
Skip test if greenlet is missing
Diffstat (limited to 'extra_tests/test_vmprof_greenlet.py')
-rw-r--r-- | extra_tests/test_vmprof_greenlet.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extra_tests/test_vmprof_greenlet.py b/extra_tests/test_vmprof_greenlet.py index 4b0e9148d4..dcb9180eb4 100644 --- a/extra_tests/test_vmprof_greenlet.py +++ b/extra_tests/test_vmprof_greenlet.py @@ -1,7 +1,7 @@ import time import pytest -import greenlet vmprof = pytest.importorskip('vmprof') +greenlet = pytest.importorskip('greenlet') def count_samples(filename): stats = vmprof.read_profile(filename) @@ -22,7 +22,7 @@ def test_sampling_inside_callback(tmpdir): vmprof.enable(f.fileno(), 1/250.0) G.switch(0.1) vmprof.disable() - + samples = count_samples(str(fname)) # 0.1 seconds at 250Hz should be 25 samples assert 23 < samples < 27 |