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

Function test_xlang_dataclass_tuple_field

python/pyfory/tests/test_struct.py:884–890  ·  view source on GitHub ↗
(track_ref)

Source from the content-addressed store, hash-verified

882
883@pytest.mark.parametrize("track_ref", [False, True])
884def test_xlang_dataclass_tuple_field(track_ref):
885 fory = Fory(xlang=True, compatible=False, ref=track_ref, strict=False)
886 fory.register_type(XlangTupleFieldObject, name="example.XlangTupleFieldObject")
887 obj = XlangTupleFieldObject(bar=("a", 1))
888 result = ser_de(fory, obj)
889 assert result == obj
890 assert isinstance(result.bar, tuple)
891
892
893@pytest.mark.parametrize("track_ref", [False, True])

Callers

nothing calls this directly

Calls 4

register_typeMethod · 0.95
ForyClass · 0.90
ser_deFunction · 0.70

Tested by

no test coverage detected