def test_format_temperature_4(self): current_mode = TemperatureUnit.CELCIUS store_mode = TemperatureUnit.CELCIUS self.assertEqual( 0, Temperature.format_temperature(0, store_mode, current_mode)) self.assertEqual( 40, Temperature.format_temperature(40, store_mode, current_mode))
def test_format_temperature_3(self): current_mode = TemperatureUnit.FAHRENHEIT store_mode = TemperatureUnit.FAHRENHEIT self.assertEqual( 0, Temperature.format_temperature(0, store_mode, current_mode)) self.assertEqual( 40, Temperature.format_temperature(40, store_mode, current_mode))
def test_format_temperature_1(self): store_mode = TemperatureUnit.CELCIUS current_mode = TemperatureUnit.FAHRENHEIT self.assertEqual( 0, Temperature.format_temperature(32, store_mode, current_mode)) self.assertEqual( 40, Temperature.format_temperature(104, store_mode, current_mode)) self.assertEqual( -50, Temperature.format_temperature(-58, store_mode, current_mode))
def test_format_temperature_2(self): current_mode = TemperatureUnit.CELCIUS store_mode = TemperatureUnit.FAHRENHEIT self.assertEqual( 32, Temperature.format_temperature(0, store_mode, current_mode)) self.assertEqual( 104, Temperature.format_temperature(40, store_mode, current_mode)) self.assertEqual( -58, Temperature.format_temperature(-50, store_mode, current_mode))