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

Function test_dump_matches_dumps_bytes

python/pyfory/tests/test_stream.py:251–262  ·  view source on GitHub ↗
(xlang)

Source from the content-addressed store, hash-verified

249
250@pytest.mark.parametrize("xlang", [False, True])
251def test_dump_matches_dumps_bytes(xlang):
252 fory = pyfory.Fory(xlang=xlang, ref=True, compatible=xlang)
253 value = {
254 "k": [1, 2, 3, 4],
255 "nested": {"x": True, "y": "hello"},
256 "f": 3.14,
257 }
258
259 sink = OneByteWriteStream()
260 fory.dump(value, sink)
261 expected = fory.dumps(value)
262 assert sink.to_bytes() == expected
263
264
265@pytest.mark.parametrize("xlang", [False, True])

Callers

nothing calls this directly

Calls 5

dumpMethod · 0.95
dumpsMethod · 0.95
to_bytesMethod · 0.95
OneByteWriteStreamClass · 0.85
ForyMethod · 0.45

Tested by

no test coverage detected