summaryrefslogtreecommitdiff
path: root/test/test_api.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-09-03 23:15:20 -0400
committerNed Batchelder <ned@nedbatchelder.com>2010-09-03 23:15:20 -0400
commit023f6b5f6789230d7dc473361d75505bf86c60f3 (patch)
treef81172151cfcdc5efb3d9f0507c81a2f6faf49f5 /test/test_api.py
parentf03f6c7869be91a754db9b82cc1b7152a86352c6 (diff)
downloadpython-coveragepy-023f6b5f6789230d7dc473361d75505bf86c60f3.tar.gz
Now completely unexecuted source files can be included in reporting. Specifying --source tells coverage.py where to search for files that haven't been executed.
Diffstat (limited to 'test/test_api.py')
-rw-r--r--test/test_api.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_api.py b/test/test_api.py
index aa6f42c..5952dfe 100644
--- a/test/test_api.py
+++ b/test/test_api.py
@@ -324,6 +324,8 @@ class SourceOmitIncludeTest(CoverageTest):
self.assertEqual(lines['p1b.py'], 3)
self.assertEqual(lines['p2a.py'], 3)
self.assertEqual(lines['p2b.py'], 3)
+ # Because there was no source= specified, we don't search for
+ # unexecuted files.
self.assert_('p1c.py' not in lines)
def test_source_package(self):
@@ -332,6 +334,8 @@ class SourceOmitIncludeTest(CoverageTest):
self.assertEqual(lines['p1b.py'], 3)
self.assert_('p2a.py' not in lines)
self.assert_('p2b.py' not in lines)
+ # Because source= was specified, we do search for unexecuted files.
+ self.assertEqual(lines['p1c.py'], 0)
def test_source_package_dotted(self):
lines = self.coverage_usepkgs_summary(source=["pkg1.p1b"])
@@ -339,6 +343,7 @@ class SourceOmitIncludeTest(CoverageTest):
self.assertEqual(lines['p1b.py'], 3)
self.assert_('p2a.py' not in lines)
self.assert_('p2b.py' not in lines)
+ self.assert_('p1c.py' not in lines)
def test_include(self):
lines = self.coverage_usepkgs_summary(include=["*/p1a.py"])