()
| 88 | |
| 89 | |
| 90 | def test_pickling_graph_index(): |
| 91 | gi = create_graph_index(None, False) |
| 92 | gi.add_nodes(3) |
| 93 | src_idx = toindex([0, 0]) |
| 94 | dst_idx = toindex([1, 2]) |
| 95 | gi.add_edges(src_idx, dst_idx) |
| 96 | |
| 97 | gi2 = _reconstruct_pickle(gi) |
| 98 | |
| 99 | assert gi2.num_nodes() == gi.num_nodes() |
| 100 | src_idx2, dst_idx2, _ = gi2.edges() |
| 101 | assert F.array_equal(src_idx.tousertensor(), src_idx2.tousertensor()) |
| 102 | assert F.array_equal(dst_idx.tousertensor(), dst_idx2.tousertensor()) |
| 103 | |
| 104 | |
| 105 | def _global_message_func(nodes): |
no test coverage detected