diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-25 22:00:36 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-25 22:00:36 -0400 |
| commit | 3ec7ec05e074911e7eba7f8a4e0cb3682f15b0a9 (patch) | |
| tree | 0732d21d3f5589d563e429afbe26a5359ab5c226 /test | |
| parent | a64cdfd45a453782d4277523bdafd72bbdb44143 (diff) | |
| download | python-coveragepy-3ec7ec05e074911e7eba7f8a4e0cb3682f15b0a9.tar.gz | |
Since people make this mistake, and it's mysterious: accept a single string for omit and include.
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_api.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_api.py b/test/test_api.py index 31d8988..0a0aabf 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -388,6 +388,15 @@ class SourceOmitIncludeTest(CoverageTest): "p1b.py p1c.py p2b.py otherb.py osb.py" ) + def test_include_as_string(self): + lines = self.coverage_usepkgs_summary(include="*a.py") + self.filenames_in_summary(lines, + "p1a.py p2a.py othera.py osa.py" + ) + self.filenames_not_in_summary(lines, + "p1b.py p1c.py p2b.py otherb.py osb.py" + ) + def test_omit(self): lines = self.coverage_usepkgs_summary(omit=["*/p1a.py"]) self.filenames_in_summary(lines, @@ -406,6 +415,15 @@ class SourceOmitIncludeTest(CoverageTest): "p1a.py p1c.py p2a.py othera.py osa.py" ) + def test_omit_as_string(self): + lines = self.coverage_usepkgs_summary(omit="*a.py") + self.filenames_in_summary(lines, + "p1b.py p2b.py otherb.py osb.py" + ) + self.filenames_not_in_summary(lines, + "p1a.py p1c.py p2a.py othera.py osa.py" + ) + def test_omit_and_include(self): lines = self.coverage_usepkgs_summary( include=["*/p1*"], omit=["*/p1a.py"] |
