Beispiel #1
0
def serialize(obj: View) -> bytes:
    return obj.encode_bytes()
Beispiel #2
0
def test_encode_bytes(name: str, typ: Type[View], value: View, serialized: str,
                      root: str, obj: ObjType):
    encoded = value.encode_bytes()
    assert encoded.hex() == serialized