Example #1
0
def test_illuminance_negative_val():
    with pytest.raises(Exception):
        lpp_illuminance_to_bytes((-1, ))
Example #2
0
def test_illuminance_invalid_val_type():
    with pytest.raises(Exception):
        lpp_illuminance_to_bytes([0, 1])
Example #3
0
def test_illuminance_invalid_val():
    with pytest.raises(Exception):
        lpp_illuminance_to_bytes((0, 1))
Example #4
0
def test_illuminance():
    val = (12345, )
    illu_buf = lpp_illuminance_to_bytes(val)
    assert lpp_illuminance_from_bytes(illu_buf) == val