MCPcopy Create free account
hub / github.com/python/cpython / test_elim_jump_to_uncond_jump4

Method test_elim_jump_to_uncond_jump4

Lib/test/test_peepholer.py:595–600  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

593 self.assertEqual(count_instr_recursively(f, 'POP_JUMP_IF_TRUE'), 1)
594
595 def test_elim_jump_to_uncond_jump4(self):
596 def f():
597 for i in range(5):
598 if i > 3:
599 print(i)
600 self.check_jump_targets(f)
601
602 def test_elim_jump_after_return1(self):
603 # Eliminate dead code: jumps immediately after returns can't be reached

Callers

nothing calls this directly

Calls 1

check_jump_targetsMethod · 0.95

Tested by

no test coverage detected