summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-11-09 07:22:27 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-11-09 19:13:58 -0500
commitf3a70c951e838e3cfab706b9a2d0459d783e5a4f (patch)
treee2e2c51cc3593d92738f39a42eab9990ce70905c /tests
parent23f567f3fe31b50d87e79e3c24a29aa888cc2872 (diff)
downloadpython-coveragepy-git-f3a70c951e838e3cfab706b9a2d0459d783e5a4f.tar.gz
fix: warn about more source file problems
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..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):