예제 #1
0
 def test_integer_value_is_returned(self):
     """
     oddball_sum will fail if the return type is not an integer.
     """
     result = main.oddball_sum([1,2,3])
     self.assertIsInstance(result, int)
예제 #2
0
 def test_known_result(self):
     """
     oddball_sum will always pass with a working list
     """
     known_result = main.oddball_sum([1,2,3,4,5])
     self.assertEqual(known_result, 9)