()
| 74 | |
| 75 | |
| 76 | def test_pickling_index(): |
| 77 | # normal index |
| 78 | i = toindex([1, 2, 3]) |
| 79 | i.tousertensor() |
| 80 | i.todgltensor() # construct a dgl tensor which is unpicklable |
| 81 | i2 = _reconstruct_pickle(i) |
| 82 | _assert_is_identical_index(i, i2) |
| 83 | |
| 84 | # slice index |
| 85 | i = toindex(slice(5, 10)) |
| 86 | i2 = _reconstruct_pickle(i) |
| 87 | _assert_is_identical_index(i, i2) |
| 88 | |
| 89 | |
| 90 | def test_pickling_graph_index(): |
no test coverage detected