diff options
Diffstat (limited to 'tests/test_api.py')
-rw-r--r-- | tests/test_api.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 22020cb4..e838e6b7 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -263,7 +263,8 @@ class ApiTest(CoverageTest): # empty summary reports raise exception, just like the xml report cov = coverage.Coverage() cov.erase() - self.assertRaises(CoverageException, cov.report) + with self.assertRaisesRegex(CoverageException, "No data to report."): + cov.report() def make_code1_code2(self): """Create the code1.py and code2.py files.""" |