summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index d287cc2a..d7e47db8 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -578,11 +578,9 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest):
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)
+ cov = coverage.Coverage(source=["pkg1"], include=["pkg2"])
+ with self.assert_warnings(cov, ["--include is ignored because --source is set"]):
+ cov.start()
def test_source_package_as_dir(self):
# pkg1 is a directory, since we cd'd into tests/modules in setUp.