(self)
| 37 | np.testing.assert_allclose(result[0], test_data) |
| 38 | |
| 39 | def test_npz1(self): |
| 40 | test_data1 = np.random.randint(0, 256, size=[3, 4, 4]) |
| 41 | with tempfile.TemporaryDirectory() as tempdir: |
| 42 | filepath = os.path.join(tempdir, "test_data.npy") |
| 43 | np.save(filepath, test_data1) |
| 44 | |
| 45 | reader = NumpyReader() |
| 46 | result = reader.get_data(reader.read(filepath)) |
| 47 | np.testing.assert_allclose(result[1]["spatial_shape"], test_data1.shape) |
| 48 | np.testing.assert_allclose(result[0].shape, test_data1.shape) |
| 49 | np.testing.assert_allclose(result[0], test_data1) |
| 50 | |
| 51 | def test_npz2(self): |
| 52 | test_data1 = np.random.randint(0, 256, size=[3, 4, 4]) |
nothing calls this directly
no test coverage detected