diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-11-11 07:51:23 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-11-11 16:45:33 -0500 |
commit | c86186ac5b305f7d72b0bd8976c0f217e604d882 (patch) | |
tree | 0e4bd0e549f76bc218a027ebf55ddbb46d4b00fc /tests/test_html.py | |
parent | 5dd9b8027d2f2edc46de157ffd00a93e6297a235 (diff) | |
download | python-coveragepy-git-c86186ac5b305f7d72b0bd8976c0f217e604d882.tar.gz |
Update an HTML gold test due to new peephole optimizations
Diffstat (limited to 'tests/test_html.py')
-rw-r--r-- | tests/test_html.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/test_html.py b/tests/test_html.py index 40c2cbf1..98e7b0b3 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -900,10 +900,7 @@ assert len(math) == 18 # partial branches and excluded lines a = 6 - while True: - break - - while 1: + while "no peephole".upper(): # t4 break while a: # pragma: no branch @@ -936,13 +933,12 @@ assert len(math) == 18 compare_html(gold_path("html/gold_partial"), "out") contains( "out/partial_py.html", - '<p id="t4" class="stm run hide_run">', + '<p id="t4" class="stm par run hide_run">', '<p id="t7" class="stm run hide_run">', - '<p id="t10" class="stm run hide_run">', # The "if 0" and "if 1" statements are optimized away. - '<p id="t13" class="pln">', + '<p id="t10" class="pln">', # The "raise AssertionError" is excluded by regex in the .ini. - '<p id="t20" class="exc">', + '<p id="t17" class="exc">', ) contains( "out/index.html", @@ -950,7 +946,7 @@ assert len(math) == 18 ) contains( "out/index.html", - '<span class="pc_cov">100%</span>' + '<span class="pc_cov">91%</span>' ) def test_styled(self): |