コード例 #1
0
    def test_get_temps_multiple_chips_one_sensor_each(self):
        chips = ['k10temp', 'it8718']
        features = ['temp1', 'temp1']
        temps = temperatures.get_temps(chips=chips, features=features)

        assert type(temps[0]) is float
        assert type(temps[1]) is float
コード例 #2
0
    def test_get_temps_None_multiple(self):
        chips = [None, None]
        features = [None, None]
        temps = temperatures.get_temps(chips=chips, features=features)

        assert isinstance(temps[0], type(None))
        assert isinstance(temps[1], type(None))
コード例 #3
0
    def test_get_temps_chip_after(self):
        chips = [None, None, 'k10temp']
        features = [None, None, 'temp1']
        temps = temperatures.get_temps(chips=chips, features=features)

        assert isinstance(temps[0], type(None))
        assert isinstance(temps[1], type(None))
        assert type(temps[2]) is float
コード例 #4
0
    def test_get_temps_chip_between(self):
        chips = [None, 'k10temp', None]
        features = [None, 'temp1', None]
        temps = temperatures.get_temps(chips=chips, features=features)

        assert isinstance(temps[0], type(None))
        assert type(temps[1]) is float
        assert isinstance(temps[2], type(None))
コード例 #5
0
    def test_get_temps_None_after(self):
        chips = ['k10temp', 'it8718', None]
        features = ['temp1', 'temp1', None]
        temps = temperatures.get_temps(chips=chips, features=features)

        assert type(temps[0]) is float
        assert type(temps[1]) is float
        assert isinstance(temps[2], type(None))
コード例 #6
0
    def test_get_temps_None_before(self):
        chips = [None, 'k10temp', 'it8718']
        features = [None, 'temp1', 'temp1']
        temps = temperatures.get_temps(chips=chips, features=features)

        assert isinstance(temps[0], type(None))
        assert type(temps[1]) is float
        assert type(temps[2]) is float