diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2017-10-24 07:01:46 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2017-10-24 07:01:46 -0400 |
commit | f8927cf4964e19ae0e8d7cabdeeef17b4c374443 (patch) | |
tree | 444c08a0df3e96a3f6a6465028e15293210360fe /tests | |
parent | 312f18e948fd58f8e6cdd06122d535639233a0d8 (diff) | |
download | python-coveragepy-f8927cf4964e19ae0e8d7cabdeeef17b4c374443.tar.gz |
Make the warning about --include and --source be a real warning
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index d287cc2..d7e47db 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. |