summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xml.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_xml.py b/tests/test_xml.py
index a03257a2..e54d2753 100644
--- a/tests/test_xml.py
+++ b/tests/test_xml.py
@@ -135,7 +135,12 @@ class XmlReportTest(XmlTestHelpers, CoverageTest):
cov = coverage.Coverage()
self.start_import_stop(cov, "innocuous")
os.remove("innocuous.py")
- cov.xml_report(ignore_errors=True)
+ with pytest.warns(Warning) as warns:
+ cov.xml_report(ignore_errors=True)
+ assert_coverage_warnings(
+ warns,
+ re.compile(r"Couldn't analyze '.*innocuous.py'. \(couldnt-parse\)"),
+ )
self.assert_exists("coverage.xml")
def test_filename_format_showing_everything(self):