summaryrefslogtreecommitdiff
path: root/test/test_xml.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-29 23:10:06 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-29 23:10:06 -0500
commit83d8d70f2a292322f1ccfd75a00b15d9c8164abb (patch)
treea0488fb2f7f16d2c176812af395f459718b15f7a /test/test_xml.py
parent1e3987d5ac551ac9ebf6a19b404d6f23aeef75e7 (diff)
downloadpython-coveragepy-83d8d70f2a292322f1ccfd75a00b15d9c8164abb.tar.gz
Refactor a bunch of tests to isolate the recursive coverage calls.
Diffstat (limited to 'test/test_xml.py')
-rw-r--r--test/test_xml.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/test_xml.py b/test/test_xml.py
index dda03e0..2a8bf30 100644
--- a/test/test_xml.py
+++ b/test/test_xml.py
@@ -42,9 +42,7 @@ class XmlReportTest(CoverageTest):
# https://bitbucket.org/ned/coveragepy/issue/208
self.make_file("innocuous.py", "a = 4")
cov = coverage.coverage()
- cov.start()
- self.import_local_file("innocuous")
- cov.stop()
+ self.start_import_stop(cov, "innocuous")
os.remove("innocuous.py")
cov.xml_report(ignore_errors=True)
self.assert_exists("coverage.xml")
@@ -55,9 +53,7 @@ class XmlReportTest(CoverageTest):
self.make_file("sub/doit.py", "print('doit!')")
self.make_file("main.py", "import sub.doit")
cov = coverage.coverage()
- cov.start()
- self.import_local_file("main")
- cov.stop()
+ self.start_import_stop(cov, "main")
return cov
def test_filename_format_showing_everything(self):