summaryrefslogtreecommitdiff
path: root/tests/test_oddball.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-10-03 18:54:55 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-10-03 18:54:55 -0400
commit8fbef1db95ca65a7bec898283da350b0e0b01847 (patch)
tree17ed9ca2737b3b638914beadc2827200fcbc3eca /tests/test_oddball.py
parenta877aaf13d9f72ee317b392c86313a3003bcb3b8 (diff)
downloadpython-coveragepy-git-8fbef1db95ca65a7bec898283da350b0e0b01847.tar.gz
Prevent pyexpat.c from being recorded as source code. #419
Diffstat (limited to 'tests/test_oddball.py')
-rw-r--r--tests/test_oddball.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index 2ca1aa75..bca7f127 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -226,6 +226,14 @@ class PyexpatTest(CoverageTest):
self.assertEqual(statements, [101, 102])
self.assertEqual(missing, [])
+ # Make sure pyexpat isn't recorded as a source file.
+ # https://bitbucket.org/ned/coveragepy/issues/419/nosource-no-source-for-code-path-to-c
+ files = cov.get_data().measured_files()
+ self.assertFalse(
+ any(f.endswith("pyexpat.c") for f in files),
+ "Pyexpat.c is in the measured files!: %r:" % (files,)
+ )
+
class ExceptionTest(CoverageTest):
"""I suspect different versions of Python deal with exceptions differently