(tmp_path)
| 927 | |
| 928 | |
| 929 | def test_xnumpy_load(tmp_path): |
| 930 | import numpy as np |
| 931 | |
| 932 | expected_x = np.arange(10) |
| 933 | npy_path = tmp_path / "data-x.npy" |
| 934 | np.save(npy_path, expected_x) |
| 935 | x = xnumpy_load(npy_path) |
| 936 | assert np.array_equal(x, expected_x) |
| 937 | |
| 938 | npz_path = tmp_path / "data.npz" |
| 939 | np.savez(npz_path, x=expected_x) |
| 940 | with xnumpy_load(npz_path) as f: |
| 941 | x = f["x"] |
| 942 | assert np.array_equal(x, expected_x) |
nothing calls this directly
no test coverage detected