diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/coveragetest.py | 2 | ||||
-rw-r--r-- | tests/test_process.py | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 28ee92e7..7fcc9f9b 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -284,7 +284,7 @@ class CoverageTest( """ saved_warnings = [] - def capture_warning(msg): + def capture_warning(msg, slug=None): # pylint: disable=unused-argument """A fake implementation of Coverage._warn, to capture warnings.""" saved_warnings.append(msg) diff --git a/tests/test_process.py b/tests/test_process.py index 2ecc9122..237bc3c7 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -493,10 +493,10 @@ class ProcessTest(CoverageTest): self.assertIn("Hello\n", out) self.assertIn(textwrap.dedent("""\ - Coverage.py warning: Module sys has no Python source. - Coverage.py warning: Module xyzzy was never imported. - Coverage.py warning: Module quux was never imported. - Coverage.py warning: No data was collected. + 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_during_reporting(self): @@ -663,7 +663,8 @@ class ProcessTest(CoverageTest): out = self.run_command("python run_twice.py") self.assertEqual( out, - "Coverage.py warning: Module foo was previously imported, but not measured.\n" + "Coverage.py warning: Module foo was previously imported, but not measured. " + "(module-not-measured)\n" ) def test_module_name(self): |