diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-02-07 08:37:14 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-02-07 08:37:14 -0500 |
commit | 2419ccf5218042b6caf9e972873d4815490c2690 (patch) | |
tree | caa84ed53ee0f10f31efc23057eabfb0c1bb0d48 /test/test_process.py | |
parent | 1a347c5401d6fe8b6f43307339fca40a1ef49bc6 (diff) | |
download | python-coveragepy-git-2419ccf5218042b6caf9e972873d4815490c2690.tar.gz |
Don't warn about not collecting data if we never ran any code in the first place.
Diffstat (limited to 'test/test_process.py')
-rw-r--r-- | test/test_process.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_process.py b/test/test_process.py index acfb8896..8a47bfc7 100644 --- a/test/test_process.py +++ b/test/test_process.py @@ -275,3 +275,13 @@ class ProcessTest(CoverageTest): Coverage.py warning: Module quux was never imported. Coverage.py warning: No data was collected. """) in out) + + def test_warnings_if_never_run(self): + out = self.run_command("coverage run i_dont_exist.py") + self.assertTrue("No file to run: 'i_dont_exist.py'" in out) + self.assertTrue("warning" not in out) + + out = self.run_command("coverage run -m no_such_module") + self.assertTrue("No module named no_such_module" in out) + self.assertTrue("warning" not in out) + |