Skip to content

Commit 70e3345

Browse files
committed
2506 is fixed?
1 parent 840537a commit 70e3345

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_coverage.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,12 @@ def test_continue(self):
457457
""",
458458
[1,2,3,4,5], "4")
459459

460-
def test_strange_unexecuted_continue(self): # pragma: not covered
460+
def test_strange_unexecuted_continue(self):
461461
# Peephole optimization of jumps to jumps can mean that some statements
462462
# never hit the line tracer. The behavior is different in different
463-
# versions of Python, so don't run this test:
464-
self.skipTest("Expected failure: peephole optimization of jumps to jumps")
463+
# versions of Python, so be careful when running this test.
464+
if env.PY2:
465+
self.skipTest("Expected failure: peephole optimization of jumps to jumps")
465466
self.check_coverage("""\
466467
a = b = c = 0
467468
for n in range(100):
@@ -485,7 +486,9 @@ def test_strange_unexecuted_continue(self): # pragma: not covered
485486
c += 1
486487
assert a == 33 and b == 50 and c == 50
487488
""",
488-
[1,2,3,4,5,6,8,9,10, 12,13,14,15,16,17,19,20,21], "")
489+
lines=[1,2,3,4,5,6,8,9,10, 12,13,14,15,16,17,19,20,21],
490+
missing=["", "6"],
491+
)
489492

490493
def test_import(self):
491494
self.check_coverage("""\

0 commit comments

Comments
 (0)