From bbf745190a4efc6a040c656f1288ff67114edc8f Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 25 Apr 2011 22:00:36 -0400 Subject: Since people make this mistake, and it's mysterious: accept a single string for omit and include. --- test/test_api.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/test_api.py b/test/test_api.py index 31d8988b..0a0aabfd 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"] -- cgit v1.2.1