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 | 50d056faa4ae653cfa0f4030674904c63a9ffe92 (patch) | |
tree | d323abeb94a009a8879d6bae6fb2e85e9a00d6bd /tests/test_api.py | |
parent | 4260c8496541638f531ab13a3e9883948077ff9c (diff) | |
download | python-coveragepy-git-50d056faa4ae653cfa0f4030674904c63a9ffe92.tar.gz |
Make the warning about --include and --source be a real warning
Diffstat (limited to 'tests/test_api.py')
-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 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. |