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
commit39f905fc1d78c65df715f8617246bc948fceb468 (patch)
tree834b20907800b6eedb79629fa4620a94a75b4d95 /tests/test_html.py
parent063df33ffd82100910076600961057aba91da2fa (diff)
downloadpython-coveragepy-39f905fc1d78c65df715f8617246bc948fceb468.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 6b398c4..004ebbf 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."""