Exemplo n.º 1
0
 def test_proper_exceptions_with_args(self):
     try:
         RemoteOperation(RaiseOperation_Safe(), "localhost").run()
     except ExceptionWithArgs as e:
         self.assertTrue(e.x == 1 and e.y == 2)
     else:
         self.fail("RaiseOperation_Safe should have thrown ExceptionWithArgs(1, 2)")
Exemplo n.º 2
0
 def test_proper_exceptions_sanity(self):
     try:
         RemoteOperation(RaiseOperation_Safe(), "localhost").run()
     except ExceptionWithArgs as e:
         pass
     else:
         self.fail("ExceptionWithArgs should have been successfully raised + caught, because proper idiom is used.")
Exemplo n.º 3
0
 def test_proper_exceptions_with_args(self):
     try:
         RemoteOperation(RaiseOperation_Safe(), "localhost").run()
     except ExceptionWithArgs, e:
         self.assertTrue(e.x == 1 and e.y == 2)
Exemplo n.º 4
0
 def test_proper_exceptions_sanity(self):
     try:
         RemoteOperation(RaiseOperation_Safe(), "localhost").run()
     except ExceptionWithArgs, e:
         pass