def test_scheme_serialization_basic(): preload, test_input = map(_stable_json_dump, [ {'a': 123, 'b': 44, 'c': 92}, {'a': 42, 'b': 44, 'c': 91}, ]) scheme = ZlibPlcdScheme('x_v1', preload) scheme_reconstructed = ZlibPlcdScheme.from_json_description_dict( scheme.json_description_dict() ) assert len(scheme.compress(test_input)) == 20 assert scheme_reconstructed.compress(test_input) == scheme.compress(test_input)