Beispiel #1
0
def test_bytes_deserialization_bad_value(value):
    with pytest.raises(DeserializationError):
        bytes_sedes.deserialize(value)
Beispiel #2
0
def test_bytes_round_trip(value, expected):
    assert bytes_sedes.deserialize(bytes_sedes.serialize(value)) == expected
    assert bytes_sedes.deserialize(bytes_sedes.serialize(bytearray(value))) == expected
Beispiel #3
0
def test_bytes_deserialize_values(value, expected):
    assert bytes_sedes.deserialize(value) == expected