diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2017-01-14 19:33:55 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-01-14 19:33:55 -0500 |
| commit | 55c48a3e041183e867a46fca51cbd6b1a5140223 (patch) | |
| tree | 872758e491843c7bf611f56915333a9c71cc812c /tests/test_api.py | |
| parent | fa0cbe2c60a324bc37cf897a60f2dae49bf48a87 (diff) | |
| download | python-coveragepy-git-55c48a3e041183e867a46fca51cbd6b1a5140223.tar.gz | |
Clean up for pull request #122
Diffstat (limited to 'tests/test_api.py')
| -rw-r--r-- | tests/test_api.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index c7fa5ca2..0ab0b75c 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -461,7 +461,15 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest): summary[k[:-3]] = v return summary - def test_source_package_unexecuted(self): + def test_source_package_as_dir(self): + # pkg1 is a directory, since we cd'd into tests/modules in setUp. + lines = self.coverage_usepkgs(source=["pkg1"]) + self.filenames_in(lines, "p1a p1b") + self.filenames_not_in(lines, "p2a p2b othera otherb osa osb") + # Because source= was specified, we do search for unexecuted files. + self.assertEqual(lines['p1c'], 0) + + def test_source_package_as_package(self): lines = self.coverage_usepkgs(source=["pkg1.sub"]) self.filenames_not_in(lines, "p2a p2b othera otherb osa osb") # Because source= was specified, we do search for unexecuted files. |
