示例#1
0
 def test_do_stuff5(self):
     test_param = ''
     res = utility.do_stuff(test_param)
     self.assertEqual(res, 'please enter a num')
示例#2
0
 def test_do_stuff_number_equals_empty(self):
     test_param = ''
     result = utility.do_stuff(test_param)
     self.assertEqual(result, 'please enter number')
示例#3
0
 def test_do_stuff_is_instance_of_value_error(self):
     test_param = 'string'
     result = utility.do_stuff(test_param)
     self.assertIsInstance(result, ValueError)
示例#4
0
 def test_do_stuff_invalid_number(self):
     test_param = None
     result = utility.do_stuff(test_param)
     self.assertEqual(result, 'please enter number')
示例#5
0
 def test_do_stuff_equal_to_15(self):
     test_param = 10
     result = utility.do_stuff(test_param)
     self.assertEqual(result, 15)