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

Function test_skip_id_custom

python/pyfory/tests/xlang_test_main.py:577–589  ·  view source on GitHub ↗

Test skipping custom types registered by ID.

()

Source from the content-addressed store, hash-verified

575
576
577def test_skip_id_custom():
578 """Test skipping custom types registered by ID."""
579 fory1 = pyfory.Fory(xlang=True, compatible=True)
580 fory1.register_type(MyExt, type_id=103, serializer=MyExtSerializer(fory1.type_resolver, MyExt))
581 fory1.register_type(EmptyWrapper, type_id=104)
582
583 fory2 = pyfory.Fory(xlang=True, compatible=True)
584 fory2.register_type(Color, type_id=101)
585 fory2.register_type(MyStruct, type_id=102)
586 fory2.register_type(MyExt, type_id=103, serializer=MyExtSerializer(fory2.type_resolver, MyExt))
587 fory2.register_type(MyWrapper, type_id=104)
588
589 _test_skip_custom(fory1, fory2)
590
591
592def test_skip_name_custom():

Callers

nothing calls this directly

Calls 4

register_typeMethod · 0.95
MyExtSerializerClass · 0.70
_test_skip_customFunction · 0.70
ForyMethod · 0.45

Tested by

no test coverage detected