def test_illuminance_invalid_buf(): with pytest.raises(Exception): lpp_illuminance_from_bytes(bytearray([0x00]))
def test_illuminance(): val = (12345, ) illu_buf = lpp_illuminance_to_bytes(val) assert lpp_illuminance_from_bytes(illu_buf) == val