def test_add5(self):
     test_param = 10
     result = main.add5(test_param)
     self.assertEqual(result, 15)
 def test_add5_2(self):
     test_param = "hello"
     result = main.add5(test_param)
     self.assertIsInstance(result, ValueError)
Exemple #3
0
 def test_add5_5(self):
     test_param = ''
     result = main.add5(test_param)
     self.assertEqual(result, 'please enter a number')
Exemple #4
0
 def test_add5_6(self):
     test_param = 0
     result = main.add5(test_param)
     self.assertEqual(result, 5)
Exemple #5
0
 def test_add5_3(self):
     test_param = 'sadfva'
     result = main.add5(test_param)
     self.assertIsInstance(result, ValueError)