diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-09-12 07:32:21 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-09-12 07:32:21 -0400 |
commit | 9f072940a69aa1417e9631bd6c8912956e798275 (patch) | |
tree | 0339ac338be8065922d822c6be8cf8f060ff8de4 /tests/test_collector.py | |
parent | ee08f60231fcd609f14c86b860d7602bbd7a294f (diff) | |
download | python-coveragepy-git-9f072940a69aa1417e9631bd6c8912956e798275.tar.gz |
Tests for debug tracing features.
Diffstat (limited to 'tests/test_collector.py')
-rw-r--r-- | tests/test_collector.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_collector.py b/tests/test_collector.py index 29c39996..af3814f3 100644 --- a/tests/test_collector.py +++ b/tests/test_collector.py @@ -13,6 +13,8 @@ class CollectorTest(CoverageTest): def test_should_trace_cache(self): # The tracers should only invoke should_trace once for each file name. + # TODO: Might be better to do this with a mocked _should_trace, + # rather than by examining debug output. # Make some files that invoke each other. self.make_file("f1.py", """\ @@ -33,6 +35,7 @@ class CollectorTest(CoverageTest): func(i) """) + # Trace one file, but not the other, and get the debug output. debug_out = StringIO() cov = coverage.coverage( include=["f1.py"], debug=['trace'], debug_file=debug_out @@ -51,4 +54,4 @@ class CollectorTest(CoverageTest): self.assertEqual(len(filenames), len(set(filenames))) # Double-check that the tracing messages are in there somewhere. - self.assertTrue(len(filenames) > 5) + self.assertGreater(len(filenames), 5) |