예제 #1
0
 def test3_temperature_tuple(self):
     temps_input = (1, 2, 3)
     self.assertEqual(tuple(),
                      temperature_utils.temperature_tuple(temps_input, "a"))
예제 #2
0
 def test_temperature_tuple(self):
     temps_input = (32, 68, 100, 104)
     expected = ((32, 0.0), (68, 20.0), (100, 37.78), (104, 40.0))
     actual = temperature_utils.temperature_tuple(temps_input, "f")
     self.assertEqual(expected, actual)
예제 #3
0
 def test2_temperature_tuple(self):
     temps_input = (-17.7778, 0, 100)
     expected = ((-17.7778, 0.0), (0, 32.0), (100, 212.0))
     actual = temperature_utils.temperature_tuple(temps_input, "c")
     self.assertEqual(expected, actual)
 def test4_temperature_tuple(self):
     temps_input = (-17.7778, 0, 100)
     expected = ((-17.7778, 255.3722), (0, 273.15), (100, 373.15))
     actual = temperature_utils.temperature_tuple(temps_input, "k")