From f3a70c951e838e3cfab706b9a2d0459d783e5a4f Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 9 Nov 2021 07:22:27 -0500 Subject: fix: warn about more source file problems --- tests/test_xml.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_xml.py b/tests/test_xml.py index a03257a2..336dec78 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 parse '.*innocuous.py'. \(couldnt-parse\)"), + ) self.assert_exists("coverage.xml") def test_filename_format_showing_everything(self): -- cgit v1.2.1