diff options
-rw-r--r-- | tests/test_collector.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_collector.py b/tests/test_collector.py index d0aa997e..29c39996 100644 --- a/tests/test_collector.py +++ b/tests/test_collector.py @@ -43,5 +43,12 @@ class CollectorTest(CoverageTest): # Grab all the filenames mentioned in debug output, there should be no # duplicates. - filenames = re.findall(r"'[^']+'", debug_out.getvalue()) + trace_lines = [ + l for l in debug_out.getvalue().splitlines() + if l.startswith("Tracing ") or l.startswith("Not tracing ") + ] + filenames = [re.search(r"'[^']+'", l).group() for l in trace_lines] self.assertEqual(len(filenames), len(set(filenames))) + + # Double-check that the tracing messages are in there somewhere. + self.assertTrue(len(filenames) > 5) |