From 50d056faa4ae653cfa0f4030674904c63a9ffe92 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 24 Oct 2017 07:01:46 -0400 Subject: Make the warning about --include and --source be a real warning --- tests/test_api.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') 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. -- cgit v1.2.1