diff options
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 16341f5d..2f30fa1f 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -484,39 +484,6 @@ class ProcessTest(CoverageTest): data.read_file(".coverage") self.assertEqual(data.line_counts()['fork.py'], 9) - def test_warnings(self): - self.make_file("hello.py", """\ - import sys, os - print("Hello") - """) - out = self.run_command("coverage run --source=sys,xyzzy,quux hello.py") - - self.assertIn("Hello\n", out) - self.assertIn(textwrap.dedent("""\ - Coverage.py warning: Module sys has no Python source. (module-not-python) - Coverage.py warning: Module xyzzy was never imported. (module-not-imported) - Coverage.py warning: Module quux was never imported. (module-not-imported) - Coverage.py warning: No data was collected. (no-data-collected) - """), out) - - def test_warnings_suppressed(self): - self.make_file("hello.py", """\ - import sys, os - print("Hello") - """) - self.make_file(".coveragerc", """\ - [run] - disable_warnings = no-data-collected, module-not-imported - """) - out = self.run_command("coverage run --source=sys,xyzzy,quux hello.py") - - self.assertIn("Hello\n", out) - self.assertIn(textwrap.dedent("""\ - Coverage.py warning: Module sys has no Python source. (module-not-python) - """), out) - self.assertNotIn("module-not-imported", out) - self.assertNotIn("no-data-collected", out) - def test_warnings_during_reporting(self): # While fixing issue #224, the warnings were being printed far too # often. Make sure they're not any more. |