diff --git a/bitshuffle/tests/test_h5filter.py b/bitshuffle/tests/test_h5filter.py index 6739b998..c7361f06 100644 --- a/bitshuffle/tests/test_h5filter.py +++ b/bitshuffle/tests/test_h5filter.py @@ -23,7 +23,7 @@ def test_filter(self): dtype = np.int64 data = np.arange(shape[0]) fname = "tmp_test_filters.h5" - f = h5py.File(fname) + f = h5py.File(fname, "w") h5.create_dataset(f, b"range", shape, dtype, chunks, filter_pipeline=(32008, 32000), filter_flags=(h5z.FLAG_MANDATORY, h5z.FLAG_MANDATORY), @@ -43,7 +43,7 @@ def test_with_block_size(self): dtype = np.int64 data = np.arange(shape[0]) fname = "tmp_test_filters.h5" - f = h5py.File(fname) + f = h5py.File(fname, "w") h5.create_dataset(f, b"range", shape, dtype, chunks, filter_pipeline=(32008, 32000), filter_flags=(h5z.FLAG_MANDATORY, h5z.FLAG_MANDATORY), @@ -65,7 +65,7 @@ def test_with_compression(self): dtype = np.int64 data = np.arange(shape[0]) fname = "tmp_test_filters.h5" - f = h5py.File(fname) + f = h5py.File(fname, "w") h5.create_dataset(f, b"range", shape, dtype, chunks, filter_pipeline=(32008,), filter_flags=(h5z.FLAG_MANDATORY,), diff --git a/bitshuffle/tests/test_h5plugin.py b/bitshuffle/tests/test_h5plugin.py index 7cc195ee..be0d09bc 100644 --- a/bitshuffle/tests/test_h5plugin.py +++ b/bitshuffle/tests/test_h5plugin.py @@ -34,8 +34,7 @@ def test_plugins(self): dtype = np.int64 data = np.arange(shape[0]) fname = "tmp_test_filters.h5" - f = h5py.File(fname) - f = h5py.File(fname) + f = h5py.File(fname, "w") dset = f.create_dataset("range", shape=shape, dtype=dtype,