diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-09-03 23:15:20 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-09-03 23:15:20 -0400 |
commit | 023f6b5f6789230d7dc473361d75505bf86c60f3 (patch) | |
tree | f81172151cfcdc5efb3d9f0507c81a2f6faf49f5 /test/test_api.py | |
parent | f03f6c7869be91a754db9b82cc1b7152a86352c6 (diff) | |
download | python-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.py | 5 |
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"]) |