Example #1
0
 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"], )
Example #2
0
 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"], )
Example #3
0
 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"],)
Example #4
0
 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"],)
Example #5
0
    def test_assert_out(self):
        def foo():
            assert_raises(AssertionError, trap.assert_out)

        trap.call(foo)
Example #6
0
 def test_assert_out(self):
     def foo():
         assert_raises(AssertionError, trap.assert_out)
     trap.call(foo)