MCPcopy Create free account
hub / github.com/apache/fory / test_big_chunk_dict

Function test_big_chunk_dict

python/pyfory/tests/test_serializer.py:138–148  ·  view source on GitHub ↗
(track_ref)

Source from the content-addressed store, hash-verified

136
137@pytest.mark.parametrize("track_ref", [False, True])
138def test_big_chunk_dict(track_ref):
139 fory = Fory(xlang=False, ref=track_ref, compatible=False)
140 now = datetime.datetime.now(datetime.timezone.utc)
141 day = datetime.date(2021, 11, 23)
142 dict0 = {}
143 values = ["a", 1, -1.0, True, False, now, day]
144 for i in range(1000):
145 dict0[i] = values[i % len(values)]
146 dict0[f"key{i}"] = values[i % len(values)]
147 dict0[float(i)] = values[i % len(values)]
148 assert ser_de(fory, dict0) == dict0
149
150
151@pytest.mark.parametrize("xlang", [True, False])

Callers

nothing calls this directly

Calls 2

ForyClass · 0.90
ser_deFunction · 0.70

Tested by

no test coverage detected