

@mock_kernel_modules
def test_sensor_temperature_in_F(self):
    sensor_id = create_w1_therm_sensor(W1ThermSensor.THERM_SENSOR_DS18B20, temperature=20)
    sensor = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS18B20, sensor_id)
    sensor.id.should.be.equal(sensor_id)
    sensor.get_temperature(W1ThermSensor.DEGREES_F).should.be.equal(68.0)
    sensor_id = create_w1_therm_sensor(W1ThermSensor.THERM_SENSOR_DS18B20, temperature=26.55)
    sensor = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS18B20, sensor_id)
    sensor.id.should.be.equal(sensor_id)
    sensor.get_temperature(W1ThermSensor.DEGREES_F).should.be.equal(79.79, epsilon=FLOAT_EPSILON)

dataset/ETHPy150Open timofurrer/w1thermsensor/test/test_core.py W1ThermSensorTest.test_sensor_temperature_in_F/original