()
| 110 | ) |
| 111 | @unittest.skipIf(dgl.backend.backend_name == "mxnet", reason="Skip MXNet") |
| 112 | def test_data_hash(): |
| 113 | class HashTestDataset(data.DGLDataset): |
| 114 | def __init__(self, hash_key=()): |
| 115 | super(HashTestDataset, self).__init__("hashtest", hash_key=hash_key) |
| 116 | |
| 117 | def _load(self): |
| 118 | pass |
| 119 | |
| 120 | a = HashTestDataset((True, 0, "1", (1, 2, 3))) |
| 121 | b = HashTestDataset((True, 0, "1", (1, 2, 3))) |
| 122 | c = HashTestDataset((True, 0, "1", (1, 2, 4))) |
| 123 | assert a.hash == b.hash |
| 124 | assert a.hash != c.hash |
| 125 | |
| 126 | |
| 127 | @unittest.skipIf( |
no test coverage detected