diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-11-15 05:53:22 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-11-15 06:52:18 -0500 |
commit | 461ab30dfd63bc5cd8947f8ec362218df7152296 (patch) | |
tree | b86429a68f81a0f20945073ee700b43e0b968c04 /tests/test_xml.py | |
parent | 081637ba3adbe6a2f46603ffdbfbc1ce52923336 (diff) | |
download | python-coveragepy-git-461ab30dfd63bc5cd8947f8ec362218df7152296.tar.gz |
Simplify the way we run coverage in these tests
Diffstat (limited to 'tests/test_xml.py')
-rw-r--r-- | tests/test_xml.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/test_xml.py b/tests/test_xml.py index 58a235ab..f73728fc 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -335,11 +335,8 @@ class XmlGoldTest(CoverageTest): """) cov = coverage.Coverage() - cov.start() - import a # pragma: nested # pylint: disable=import-error - cov.stop() # pragma: nested + a = self.start_import_stop(cov, "a") cov.xml_report(a, outfile="coverage.xml") - compare_xml(gold_path("html/gold_x_xml"), ".", actual_extra=True) def test_a_xml_2(self): @@ -358,9 +355,7 @@ class XmlGoldTest(CoverageTest): """) cov = coverage.Coverage(config_file="run_a_xml_2.ini") - cov.start() - import a # pragma: nested # pylint: disable=import-error - cov.stop() # pragma: nested + a = self.start_import_stop(cov, "a") cov.xml_report(a) compare_xml(gold_path("html/gold_x_xml"), "xml_2") @@ -376,8 +371,6 @@ class XmlGoldTest(CoverageTest): """) cov = coverage.Coverage(branch=True) - cov.start() - import y # pragma: nested # pylint: disable=import-error - cov.stop() # pragma: nested + y = self.start_import_stop(cov, "y") cov.xml_report(y, outfile="y_xml_branch/coverage.xml") compare_xml(gold_path("html/gold_y_xml_branch"), "y_xml_branch") |