summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_coroutine.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_coroutine.py b/tests/test_coroutine.py
index b204827e..38de7a3d 100644
--- a/tests/test_coroutine.py
+++ b/tests/test_coroutine.py
@@ -32,7 +32,7 @@ def line_count(s):
class CoroutineTest(CoverageTest):
"""Tests of the coroutine support in coverage.py."""
- LIMIT = 1000
+ LIMIT = 3 # Should be 1000, but this gives me a reasonable amount of output.
# The code common to all the concurrency models.
COMMON = """
@@ -136,6 +136,19 @@ class CoroutineTest(CoverageTest):
self.try_some_code(self.GEVENT, "--coroutine=gevent")
+ def test_gevent_badly(self):
+ # This test shouldn't pass. It should fail because we are running
+ # gevent code without the --coroutine=gevent flag. It's here so I can
+ # see how gevent code looks when it isn't measured properly. The C
+ # extension implementation of coroutining is currently acting precisely
+ # as if no coroutine support is available (demonstrated by this test),
+ # and I don't know why. This test is part of me debugging that
+ # problem.
+ if gevent is None:
+ raise SkipTest("No gevent available")
+
+ self.try_some_code(self.GEVENT, "")
+
def print_simple_annotation(code, linenos):
"""Print the lines in `code` with X for each line number in `linenos`."""