summaryrefslogtreecommitdiff
path: root/tests/test_html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-28 07:50:55 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-28 07:50:55 -0500
commit7f15dd95f5626eea58ca91172885eeaf019aed14 (patch)
tree9f21b08ad09fda11acc95ce02fd58c118f64ea7c /tests/test_html.py
parent000f1c7d689ee0c85b7f08924512e332f4f1e509 (diff)
downloadpython-coveragepy-git-7f15dd95f5626eea58ca91172885eeaf019aed14.tar.gz
Fix bug with \f in HTML report. #360.
Diffstat (limited to 'tests/test_html.py')
-rw-r--r--tests/test_html.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_html.py b/tests/test_html.py
index 6b398c43..004ebbfb 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -322,6 +322,16 @@ class HtmlWithUnparsableFilesTest(HtmlTestHelpers, CoverageTest):
expected = "# Isn&#39;t this great?&#203;!"
self.assertIn(expected, html_report)
+ def test_formfeeds(self):
+ # https://bitbucket.org/ned/coveragepy/issue/360/html-reports-get-confused-by-l-in-the-code
+ self.make_file("formfeed.py", "line_one = 1\n\f\nline_two = 2\n")
+ cov = coverage.coverage()
+ self.start_import_stop(cov, "formfeed")
+ cov.html_report()
+
+ formfeed_html = self.get_html_report_content("formfeed.py")
+ self.assertIn("line_two", formfeed_html)
+
class HtmlTest(CoverageTest):
"""Moar HTML tests."""