diff options
Diffstat (limited to 'tests/test_xml.py')
-rw-r--r-- | tests/test_xml.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/test_xml.py b/tests/test_xml.py index b9b36efb..dbf09279 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -1,3 +1,6 @@ +# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 +# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt + """Tests for XML reports from coverage.py.""" import os @@ -21,7 +24,7 @@ class XmlTestHelpers(CoverageTest): self.make_file("sub/__init__.py") self.make_file("sub/doit.py", "print('doit!')") self.make_file("main.py", "import sub.doit") - cov = coverage.coverage() + cov = coverage.Coverage() self.start_import_stop(cov, "main") return cov @@ -30,7 +33,7 @@ class XmlTestHelpers(CoverageTest): Makes `width` directories, named d0 .. d{width-1}. Each directory has __init__.py, and `width` files, named f0.py .. f{width-1}.py. Each - directory also has `width` subdirectories, in the same fashion, until + directory also has `width` sub-directories, in the same fashion, until a depth of `depth` is reached. """ @@ -88,7 +91,7 @@ class XmlReportTest(XmlTestHelpers, CoverageTest): # Written while investigating a bug, might as well keep it. # https://bitbucket.org/ned/coveragepy/issue/208 self.make_file("innocuous.py", "a = 4") - cov = coverage.coverage() + cov = coverage.Coverage() self.start_import_stop(cov, "innocuous") os.remove("innocuous.py") cov.xml_report(ignore_errors=True) @@ -120,7 +123,7 @@ class XmlReportTest(XmlTestHelpers, CoverageTest): # Used to raise a zero division error: # https://bitbucket.org/ned/coveragepy/issue/250 self.make_file("empty.py", "") - cov = coverage.coverage() + cov = coverage.Coverage() empty = self.start_import_stop(cov, "empty") cov.xml_report([empty], outfile="-") xml = self.stdout() @@ -160,7 +163,7 @@ class XmlPackageStructureTest(XmlTestHelpers, CoverageTest): self.make_file("main.py", """\ from d0.d0 import f0 """) - cov = coverage.coverage(source=".") + cov = coverage.Coverage(source=".") self.start_import_stop(cov, "main") self.assert_package_and_class_tags(cov, """\ <package name="."> @@ -178,7 +181,7 @@ class XmlPackageStructureTest(XmlTestHelpers, CoverageTest): self.make_file("main.py", """\ from d0.d0 import f0 """) - cov = coverage.coverage(source=".") + cov = coverage.Coverage(source=".") self.start_import_stop(cov, "main") cov.config["xml:package_depth"] = 1 |