コード例 #1
0
 def test_fahrenheitToCelsius_forTypeErrorReturn(self):
     # Capture the results of the function
     #result = fahrenheitToCelsius("str")
     # Check for expected output
     self.assertRaises(TypeError, fahrenheitToCelsius("str"))
コード例 #2
0
 def test_fahrenheitToCelsius_for50F(self):
     # Capture the results of the function
     result = fahrenheitToCelsius(50)
     # Check for expected output
     self.assertEqual(10.0, result)
コード例 #3
0
 def test_fahrenheitToCelsius_forTypeError(self):
     # Capture the results of the function
     result = fahrenheitToCelsius("str")
     # Check for expected output
     self.assertEqual(-9999, result)