From d802adad2dd55ea2d34515de800e81cce13adff2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 31 Jul 2014 06:39:50 -0400 Subject: Update tests for really testing gevent with a C extension. --HG-- branch : c-coroutine --- tests/test_coroutine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_coroutine.py') diff --git a/tests/test_coroutine.py b/tests/test_coroutine.py index fe6c8326..b204827e 100644 --- a/tests/test_coroutine.py +++ b/tests/test_coroutine.py @@ -101,7 +101,7 @@ class CoroutineTest(CoverageTest): self.make_file("try_it.py", code) - out = self.run_command("coverage run --timid %s try_it.py" % args) + out = self.run_command("coverage run %s try_it.py" % args) expected_out = "%d\n" % (sum(range(self.LIMIT))) self.assertEqual(out, expected_out) @@ -129,7 +129,7 @@ class CoroutineTest(CoverageTest): self.try_some_code(self.EVENTLET, "--coroutine=eventlet") def test_gevent(self): - raise SkipTest("Still not sure why gevent isn't working...") + #raise SkipTest("Still not sure why gevent isn't working...") if gevent is None: raise SkipTest("No gevent available") -- cgit v1.2.1 From b4c78975cbc67d14bcd9cba5bff2abaa3850b1c9 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 31 Jul 2014 06:40:06 -0400 Subject: Temporary debugging tweaks to tests --HG-- branch : c-coroutine --- tests/test_coroutine.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/test_coroutine.py') 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`.""" -- cgit v1.2.1