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

Function test_enum_field

python/pyfory/tests/test_cross_language.py:487–493  ·  view source on GitHub ↗
(data_file_path)

Source from the content-addressed store, hash-verified

485
486@cross_language_test
487def test_enum_field(data_file_path):
488 compatible = "compatible" in data_file_path
489 fory = pyfory.Fory(xlang=True, ref=False, compatible=compatible)
490 fory.register_type(EnumTestClass, name="test.EnumTestClass")
491 fory.register_type(EnumFieldStruct, name="test.EnumFieldStruct")
492 obj = EnumFieldStruct(f1=EnumTestClass.FOO, f2=EnumTestClass.BAR, f3="abc")
493 struct_round_back(data_file_path, fory, obj)
494
495
496@cross_language_test

Callers

nothing calls this directly

Calls 4

register_typeMethod · 0.95
struct_round_backFunction · 0.85
EnumFieldStructClass · 0.70
ForyMethod · 0.45

Tested by

no test coverage detected