Пример #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"], )
Пример #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"], )
Пример #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"],)
Пример #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"],)
Пример #5
0
    def test_assert_out(self):
        def foo():
            assert_raises(AssertionError, trap.assert_out)

        trap.call(foo)
Пример #6
0
 def test_assert_out(self):
     def foo():
         assert_raises(AssertionError, trap.assert_out)
     trap.call(foo)