(data_file_path)
| 526 | |
| 527 | @cross_language_test |
| 528 | def test_serialize_complex_struct(data_file_path): |
| 529 | compatible = "compatible" in data_file_path |
| 530 | fory = pyfory.Fory(xlang=True, ref=True, compatible=compatible) |
| 531 | fory.register_type(ComplexObject1, name="test.ComplexObject1") |
| 532 | fory.register_type(ComplexObject2, name="test.ComplexObject2") |
| 533 | |
| 534 | obj2 = ComplexObject2(f1=True, f2={-1: 2}) |
| 535 | obj1 = ComplexObject1( |
| 536 | f1=obj2, |
| 537 | f2="abc", |
| 538 | f3=["abc", "abc"], |
| 539 | f4={1: 2}, |
| 540 | f5=2**7 - 1, |
| 541 | f6=2**15 - 1, |
| 542 | f7=2**31 - 1, |
| 543 | f8=2**63 - 1, |
| 544 | f9=1.0 / 2, |
| 545 | f10=1 / 3.0, |
| 546 | f11=array.array("h", [1, 2]), |
| 547 | f12=[-1, 4], |
| 548 | ) |
| 549 | struct_round_back(data_file_path, fory, obj1) |
| 550 | |
| 551 | |
| 552 | def _deep_equal(left, right): |
nothing calls this directly
no test coverage detected