Пример #1
0
 def test_add(self):
     num = 10
     result = master.Add5(num)
     self.assertEqual(result, 15)
Пример #2
0
 def test_input_empty_string(self):
     empty_string = ''
     result = master.Add5(empty_string)
     self.assertEqual(result, 'Please enter number')
Пример #3
0
 def test_input_string(self):
     string = 'jdfoir'
     result = master.Add5(string)
     self.assertIsInstance(result, ValueError)
Пример #4
0
 def test_input_none(self):
     Noneobj = None
     result = master.Add5(Noneobj)
     self.assertEqual(result, 'Please enter number')
Пример #5
0
 def test_add(self):
     '''Test start'''
     num = 10
     result = master.Add5(num)
     self.assertEqual(result, 15)