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

Function test_stream_deserialize_truncated_error

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

Source from the content-addressed store, hash-verified

239
240@pytest.mark.parametrize("xlang", [False, True])
241def test_stream_deserialize_truncated_error(xlang):
242 fory = pyfory.Fory(xlang=xlang, ref=True, compatible=xlang)
243 data = fory.serialize({"k": "value", "numbers": [1, 2, 3, 4]})
244 truncated = data[:-1]
245
246 with pytest.raises(Exception):
247 fory.deserialize(Buffer.from_stream(OneByteStream(truncated)))
248
249
250@pytest.mark.parametrize("xlang", [False, True])

Callers

nothing calls this directly

Calls 4

serializeMethod · 0.95
deserializeMethod · 0.95
OneByteStreamClass · 0.85
ForyMethod · 0.45

Tested by

no test coverage detected