()
| 169 | |
| 170 | |
| 171 | def test_serialize_empty_dict(): |
| 172 | # create a temporary file and immediately release it so DGL can open it. |
| 173 | f = tempfile.NamedTemporaryFile(delete=False) |
| 174 | path = f.name |
| 175 | f.close() |
| 176 | |
| 177 | tensor_dict = {} |
| 178 | |
| 179 | save_tensors(path, tensor_dict) |
| 180 | |
| 181 | load_tensor_dict = load_tensors(path) |
| 182 | assert isinstance(load_tensor_dict, dict) |
| 183 | assert len(load_tensor_dict) == 0 |
| 184 | |
| 185 | os.unlink(path) |
| 186 | |
| 187 | |
| 188 | def load_old_files(files): |
nothing calls this directly
no test coverage detected