From bd929f953734f3f5d6cf3e0534aa573b44fc45e2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 23 Oct 2021 19:01:27 -0400 Subject: fix(html): fix a few problems with the html report - highlights weren't showing - anchored lines were not visible - some j/k motions were broken - clicking the big buttons at the top didn't work --- tests/test_html.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/test_html.py') diff --git a/tests/test_html.py b/tests/test_html.py index 84cc2d4c..849be567 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -23,7 +23,7 @@ from coverage.report import get_analysis_to_report from tests.coveragetest import CoverageTest, TESTS_DIR from tests.goldtest import gold_path -from tests.goldtest import compare, contains, doesnt_contain, contains_any +from tests.goldtest import compare, contains, contains_rx, doesnt_contain, contains_any from tests.helpers import assert_coverage_warnings, change_dir @@ -893,14 +893,14 @@ assert len(math) == 18 if env.PYBEHAVIOR.pep626: cov.html_report(partial, directory="out/partial_626") compare_html(gold_path("html/partial_626"), "out/partial_626") - contains( + contains_rx( "out/partial_626/partial_py.html", - '

', - '

', + r'

.* id="t4"', + r'

.* id="t7"', # The "if 0" and "if 1" statements are marked as run. - '

', + r'

.* id="t10"', # The "raise ZeroDivisionError" is excluded by regex in the .ini. - '

', + r'

.* id="t17"', ) contains( "out/partial_626/index.html", @@ -910,14 +910,14 @@ assert len(math) == 18 else: cov.html_report(partial, directory="out/partial") compare_html(gold_path("html/partial"), "out/partial") - contains( + contains_rx( "out/partial/partial_py.html", - '

', - '

', + r'

.* id="t4"', + r'

.* id="t7"', # The "if 0" and "if 1" statements are optimized away. - '

', + r'

.* id="t10"', # The "raise ZeroDivisionError" is excluded by regex in the .ini. - '

', + r'

.* id="t17"', ) contains( "out/partial/index.html", -- cgit v1.2.1