def test_call(self): assert trap.call(lambda: 0) == 0 assert trap.call(lambda: 1) == 1 try: trap.call(self.cause_badwindow) except XError, e: assert e.args == (wimpiggy.lowlevel.const["BadWindow"], )
def test_call(self): assert trap.call(lambda: 0) == 0 assert trap.call(lambda: 1) == 1 try: trap.call(self.cause_badwindow) except XError as e: assert e.args == (constants["BadWindow"], )
def test_call(self): assert trap.call(lambda: 0) == 0 assert trap.call(lambda: 1) == 1 try: trap.call(self.cause_badwindow) except XError, e: assert e.args == (constants["BadWindow"],)
def test_call(self): assert trap.call(lambda: 0) == 0 assert trap.call(lambda: 1) == 1 try: trap.call(self.cause_badwindow) except XError, e: assert e.args == (wimpiggy.lowlevel.const["BadWindow"],)
def test_assert_out(self): def foo(): assert_raises(AssertionError, trap.assert_out) trap.call(foo)