Exemple #1
0
 def test_function_exception3(self):
     y = foo.my_inverse_func3(2)
     self.assertEqual(y, 0.5)
     self.assertRaises(foo.exception, foo.my_inverse_func2, 0)
     try:
         foo.my_inverse_func3(0)
     except foo.exception, ex:
         msg = str(ex)
Exemple #2
0
 def test_function_exception3(self):
     y = foo.my_inverse_func3(2)
     self.assertEqual(y, 0.5)
     self.assertRaises(foo.exception, foo.my_inverse_func2, 0)
     try:
         foo.my_inverse_func3(0)
     except foo.exception, ex:
         msg = str(ex)