summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peepholer.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_peepholer.py')
-rw-r--r--Lib/test/test_peepholer.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index 92a82cc..4034154 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -409,21 +409,6 @@ class TestTranforms(BytecodeTestCase):
self.assertLessEqual(len(returns), 6)
self.check_lnotab(f)
- def test_elim_jump_after_return2(self):
- # Eliminate dead code: jumps immediately after returns can't be reached
- def f(cond1, cond2):
- while 1:
- if cond1: return 4
- self.assertNotInBytecode(f, 'JUMP_FORWARD')
- # There should be one jump for the while loop.
- jumps = [instr for instr in dis.get_instructions(f)
- if 'JUMP' in instr.opname]
- self.assertEqual(len(jumps), 1)
- returns = [instr for instr in dis.get_instructions(f)
- if instr.opname == 'RETURN_VALUE']
- self.assertLessEqual(len(returns), 2)
- self.check_lnotab(f)
-
def test_make_function_doesnt_bail(self):
def f():
def g()->1+1: