Exemplo n.º 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"], )
Exemplo n.º 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"], )
Exemplo n.º 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"],)
Exemplo n.º 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"],)
Exemplo n.º 5
0
    def test_assert_out(self):
        def foo():
            assert_raises(AssertionError, trap.assert_out)

        trap.call(foo)
Exemplo n.º 6
0
 def test_assert_out(self):
     def foo():
         assert_raises(AssertionError, trap.assert_out)
     trap.call(foo)