MCPcopy
hub / github.com/faust-streaming/faust / test_json_subset

Function test_json_subset

tests/unit/serializers/test_codecs.py:36–45  ·  view source on GitHub ↗
(codec: str)

Source from the content-addressed store, hash-verified

34
35@pytest.mark.parametrize("codec", ["json", "pickle", "yaml"])
36def test_json_subset(codec: str) -> None:
37 if codec == "json":
38 # special exception for json since integers can be serialized
39 assert loads(codec, dumps(codec, DATA)) == {
40 "a": 1,
41 "b": "string",
42 "1": 2,
43 }
44 else:
45 assert loads(codec, dumps(codec, DATA)) == DATA
46
47
48def test_missing_yaml_library() -> None:

Callers

nothing calls this directly

Calls 2

loadsFunction · 0.90
dumpsFunction · 0.90

Tested by

no test coverage detected