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

Function test_strict

python/pyfory/tests/test_struct.py:613–617  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

611
612
613def test_strict():
614 fory = Fory(xlang=False, ref=True, compatible=False)
615 obj = ChildClass1(f1="a", f2=-10, f3={"a": -10.0, "b": 1 / 3})
616 with pytest.raises(TypeUnregisteredError):
617 fory.serialize(obj)
618
619
620def test_inheritance():

Callers

nothing calls this directly

Calls 3

serializeMethod · 0.95
ForyClass · 0.90
ChildClass1Class · 0.85

Tested by

no test coverage detected