diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-17 14:55:14 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-17 14:55:14 -0500 |
commit | e80f5f8fbc370a49040f020f90982ca73767c9fd (patch) | |
tree | 4ea1efaee159146936e35d680952c85c3e6c2cf0 /tests/test_html.py | |
parent | a17ce9e93cb61915880a040769e9e40447a6a7d8 (diff) | |
download | python-coveragepy-git-e80f5f8fbc370a49040f020f90982ca73767c9fd.tar.gz |
Use file names with extensions in reports.
--HG--
rename : tests/farm/html/gold_a/a.html => tests/farm/html/gold_a/a_py.html
rename : tests/farm/html/gold_b_branch/b.html => tests/farm/html/gold_b_branch/b_py.html
rename : tests/farm/html/gold_bom/bom.html => tests/farm/html/gold_bom/bom_py.html
rename : tests/farm/html/gold_isolatin1/isolatin1.html => tests/farm/html/gold_isolatin1/isolatin1_py.html
rename : tests/farm/html/gold_omit_1/m1.html => tests/farm/html/gold_omit_1/m1_py.html
rename : tests/farm/html/gold_omit_1/m2.html => tests/farm/html/gold_omit_1/m2_py.html
rename : tests/farm/html/gold_omit_1/m3.html => tests/farm/html/gold_omit_1/m3_py.html
rename : tests/farm/html/gold_omit_1/main.html => tests/farm/html/gold_omit_1/main_py.html
rename : tests/farm/html/gold_omit_2/m2.html => tests/farm/html/gold_omit_2/m2_py.html
rename : tests/farm/html/gold_omit_2/m3.html => tests/farm/html/gold_omit_2/m3_py.html
rename : tests/farm/html/gold_omit_2/main.html => tests/farm/html/gold_omit_2/main_py.html
rename : tests/farm/html/gold_omit_3/m3.html => tests/farm/html/gold_omit_3/m3_py.html
rename : tests/farm/html/gold_omit_3/main.html => tests/farm/html/gold_omit_3/main_py.html
rename : tests/farm/html/gold_omit_4/m1.html => tests/farm/html/gold_omit_4/m1_py.html
rename : tests/farm/html/gold_omit_4/m3.html => tests/farm/html/gold_omit_4/m3_py.html
rename : tests/farm/html/gold_omit_4/main.html => tests/farm/html/gold_omit_4/main_py.html
rename : tests/farm/html/gold_omit_5/m1.html => tests/farm/html/gold_omit_5/m1_py.html
rename : tests/farm/html/gold_omit_5/main.html => tests/farm/html/gold_omit_5/main_py.html
rename : tests/farm/html/gold_other/blah_blah_other.html => tests/farm/html/gold_other/blah_blah_other_py.html
rename : tests/farm/html/gold_other/here.html => tests/farm/html/gold_other/here_py.html
rename : tests/farm/html/gold_partial/partial.html => tests/farm/html/gold_partial/partial_py.html
rename : tests/farm/html/gold_styled/a.html => tests/farm/html/gold_styled/a_py.html
rename : tests/farm/html/gold_unicode/unicode.html => tests/farm/html/gold_unicode/unicode_py.html
Diffstat (limited to 'tests/test_html.py')
-rw-r--r-- | tests/test_html.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/test_html.py b/tests/test_html.py index cf143cc1..cc817985 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -38,13 +38,13 @@ class HtmlTestHelpers(CoverageTest): def remove_html_files(self): """Remove the HTML files created as part of the HTML report.""" os.remove("htmlcov/index.html") - os.remove("htmlcov/main_file.html") - os.remove("htmlcov/helper1.html") - os.remove("htmlcov/helper2.html") + os.remove("htmlcov/main_file_py.html") + os.remove("htmlcov/helper1_py.html") + os.remove("htmlcov/helper2_py.html") def get_html_report_content(self, module): """Return the content of the HTML report for `module`.""" - filename = module.replace(".py", ".html").replace("/", "_") + filename = module.replace(".", "_").replace("/", "_") + ".html" filename = os.path.join("htmlcov", filename) with open(filename) as f: return f.read() @@ -70,9 +70,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): self.run_coverage() self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/helper2.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/helper2_py.html") self.assert_exists("htmlcov/style.css") self.assert_exists("htmlcov/coverage_html.js") @@ -96,9 +96,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # Only the changed files should have been created. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_doesnt_exist("htmlcov/main_file.html") - self.assert_doesnt_exist("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_doesnt_exist("htmlcov/main_file_py.html") + self.assert_doesnt_exist("htmlcov/helper2_py.html") with open("htmlcov/index.html") as f: index2 = f.read() self.assertMultiLineEqual(index1, index2) @@ -121,9 +121,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # Only the changed files should have been created. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_doesnt_exist("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_doesnt_exist("htmlcov/helper2_py.html") def test_html_delta_from_settings_change(self): # HTML generation can create only the files that have changed. @@ -139,9 +139,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # All the files have been reported again. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_exists("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_exists("htmlcov/helper2_py.html") with open("htmlcov/index.html") as f: index2 = f.read() self.assertMultiLineEqual(index1, index2) @@ -163,9 +163,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # All the files have been reported again. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_exists("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_exists("htmlcov/helper2_py.html") with open("htmlcov/index.html") as f: index2 = f.read() fixed_index2 = index2.replace("XYZZY", self.real_coverage_version) |