MCPcopy Create free account
hub / github.com/apache/tvm-ffi / test_object_array_of_objects

Function test_object_array_of_objects

tests/python/test_dataclass_compare.py:730–757  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

728
729
730def test_object_array_of_objects() -> None:
731 a = create_object(
732 "testing.TestObjectDerived",
733 v_i64=0,
734 v_f64=0.0,
735 v_str="",
736 v_map=tvm_ffi.Map({}),
737 v_array=tvm_ffi.Array(
738 [
739 TestIntPair(1, 2),
740 TestIntPair(3, 4),
741 ]
742 ),
743 )
744 b = create_object(
745 "testing.TestObjectDerived",
746 v_i64=0,
747 v_f64=0.0,
748 v_str="",
749 v_map=tvm_ffi.Map({}),
750 v_array=tvm_ffi.Array(
751 [
752 TestIntPair(1, 2),
753 TestIntPair(3, 4),
754 ]
755 ),
756 )
757 assert RecursiveEq(a, b)
758
759
760def test_object_array_of_objects_differ() -> None:

Callers

nothing calls this directly

Calls 5

create_objectFunction · 0.90
TestIntPairClass · 0.90
RecursiveEqFunction · 0.90
ArrayMethod · 0.80
MapMethod · 0.45

Tested by

no test coverage detected