()
| 618 | |
| 619 | |
| 620 | def test_inheritance(): |
| 621 | type_hints = typing.get_type_hints(ChildClass1) |
| 622 | print(type_hints) |
| 623 | assert type_hints.keys() == {"f1", "f2", "f3"} |
| 624 | fory = Fory(xlang=False, ref=True, strict=False, compatible=False) |
| 625 | obj = ChildClass1(f1="a", f2=-10, f3={"a": -10.0, "b": 1 / 3}) |
| 626 | assert ser_de(fory, obj) == obj |
| 627 | assert type(fory.type_resolver.get_serializer(ChildClass1)) is pyfory.DataClassSerializer |
| 628 | |
| 629 | |
| 630 | @dataclass |
nothing calls this directly
no test coverage detected