Exemple #1
0
 def test_should_raise_exception(self):
     with self.assertRaises(TypeError):
         x = 4
         increment.inc2(x, n="xyz")
Exemple #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!")
Exemple #3
0
 def test_should_catch_exception(self):
     increment.inc2(3, n="xyz")