Beispiel #1
0
 def test_should_raise_exception(self):
     with self.assertRaises(TypeError):
         x = 4
         increment.inc2(x, n="xyz")
Beispiel #2
0
 def test_should_increment_by_n(self):
     n = 3
     actual = increment.inc2(self.x, n=3)
     self.assertEqual(self.x + n, actual, "what!")
Beispiel #3
0
 def test_should_catch_exception(self):
     increment.inc2(3, n="xyz")