def test_elim_jump_to_return(self):

    def f(cond, true_value, false_value):
        return (true_value if cond else false_value)
    self.check_jump_targets(f)
    self.assertNotInBytecode(f, 'JUMP_FORWARD')
    self.assertNotInBytecode(f, 'JUMP_ABSOLUTE')
    returns = [instr for instr in dis.get_instructions(f) if (instr.opname == 'RETURN_VALUE')]
    self.assertEqual(len(returns), 2)
    self.check_lnotab(f)
def test_elim_jump_to_return(self):

    def f(cond, true_value, false_value):
        return (true_value if cond else false_value)
    self.check_jump_targets(f)
    self.assertNotInBytecode(f, 'JUMP_FORWARD')
    self.assertNotInBytecode(f, 'JUMP_ABSOLUTE')
    returns = [instr for instr in dis.get_instructions(f) if (instr.opname == 'RETURN_VALUE')]
    self.assertEqual(len(returns), 2)
    self.check_lnotab(f)