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 | 8153341439f1eddddad18ee6ca8ca10a88549129 (patch) | |
tree | d9e6c8a5d9c7e642157a2bf15e1d7a659969c843 /test/test_api.py | |
parent | 9da5c35a04dd117dda5f868ab1057b2f0603708b (diff) | |
download | python-coveragepy-git-8153341439f1eddddad18ee6ca8ca10a88549129.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 aa6f42cd..5952dfe7 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"]) |