summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorloic@dachary.org <loic@dachary.org>2017-01-07 14:39:44 +0100
committerloic@dachary.org <loic@dachary.org>2017-01-07 14:39:44 +0100
commit6cee6103a399dfb00f95962033624855642fd722 (patch)
tree517218fb7deb814b75b8c91b9936f664df4b3744 /tests/test_api.py
parent9242d96f2be40ecc556f8cf3cb9fb6fea7d4ea02 (diff)
downloadpython-coveragepy-git-6cee6103a399dfb00f95962033624855642fd722.tar.gz
* --source and --include are mutually exclusive (take 2) #265
close #265 close #101
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 56184586..8beb630d 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -579,6 +579,13 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest):
summary[k[:-3]] = v
return summary
+ def test_source_include_exclusive(self):
+ lines = self.coverage_usepkgs(source=["pkg1"], include=["pkg2"])
+ self.filenames_in(lines, "p1a p1b")
+ self.filenames_not_in(lines, "p2a p2b othera otherb osa osb")
+ out = self.stdout()
+ self.assertIn("--include is ignored", out)
+
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"])