def test_elim_jump_after_return2(self):

    def f(cond1, cond2):
        while 1:
            if cond1:
                return 4
    self.assertNotInBytecode(f, 'JUMP_FORWARD')
    returns = [instr for instr in dis.get_instructions(f) if (instr.opname == 'JUMP_ABSOLUTE')]
    self.assertEqual(len(returns), 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_elim_jump_after_return2(self):

    def f(cond1, cond2):
        while 1:
            if cond1:
                return 4
    self.assertNotInBytecode(f, 'JUMP_FORWARD')
    returns = [instr for instr in dis.get_instructions(f) if (instr.opname == 'JUMP_ABSOLUTE')]
    self.assertEqual(len(returns), 1)
    returns = [instr for instr in dis.get_instructions(f) if (instr.opname == 'RETURN_VALUE')]
    self.assertLessEqual(len(returns), 2)
    self.check_lnotab(f)