|
21 | 21 | from zarr.core import Array |
22 | 22 | from zarr.creation import open_array |
23 | 23 | from zarr.hierarchy import Group, group, open_group |
24 | | -from zarr.storage import (ABSStore, DBMStore, DirectoryStore, FSStore, |
25 | | - LMDBStore, LRUStoreCache, MemoryStore, |
26 | | - NestedDirectoryStore, SQLiteStore, ZipStore, |
27 | | - array_meta_key, atexit_rmglob, atexit_rmtree, |
28 | | - group_meta_key, init_array, init_group) |
| 24 | +from zarr.storage import (ABSStore, DBMStore, DirectoryStore, LMDBStore, |
| 25 | + LRUStoreCache, MemoryStore, NestedDirectoryStore, |
| 26 | + SQLiteStore, ZipStore, array_meta_key, atexit_rmglob, |
| 27 | + atexit_rmtree, group_meta_key, init_array, |
| 28 | + init_group) |
29 | 29 | from zarr.util import InfoReporter |
30 | | -from zarr.tests.util import skip_test_env_var, have_fsspec |
| 30 | +from zarr.tests.util import skip_test_env_var |
31 | 31 |
|
32 | 32 |
|
33 | 33 | # noinspection PyStatementEffect |
@@ -971,51 +971,6 @@ def create_store(): |
971 | 971 | return store, None |
972 | 972 |
|
973 | 973 |
|
974 | | -@pytest.mark.skipif(have_fsspec is False, reason="needs fsspec") |
975 | | -class TestGroupWithFSStore(TestGroup): |
976 | | - |
977 | | - @staticmethod |
978 | | - def create_store(): |
979 | | - path = tempfile.mkdtemp() |
980 | | - atexit.register(atexit_rmtree, path) |
981 | | - store = FSStore(path) |
982 | | - return store, None |
983 | | - |
984 | | - def test_round_trip_nd(self): |
985 | | - data = np.arange(1000).reshape(10, 10, 10) |
986 | | - name = 'raw' |
987 | | - |
988 | | - store, _ = self.create_store() |
989 | | - f = open_group(store, mode='w') |
990 | | - f.create_dataset(name, data=data, chunks=(5, 5, 5), |
991 | | - compressor=None) |
992 | | - h = open_group(store, mode='r') |
993 | | - np.testing.assert_array_equal(h[name][:], data) |
994 | | - |
995 | | - |
996 | | -@pytest.mark.skipif(have_fsspec is False, reason="needs fsspec") |
997 | | -class TestGroupWithNestedFSStore(TestGroupWithFSStore): |
998 | | - |
999 | | - @staticmethod |
1000 | | - def create_store(): |
1001 | | - path = tempfile.mkdtemp() |
1002 | | - atexit.register(atexit_rmtree, path) |
1003 | | - store = FSStore(path, key_separator='/', auto_mkdir=True) |
1004 | | - return store, None |
1005 | | - |
1006 | | - def test_inconsistent_dimension_separator(self): |
1007 | | - data = np.arange(1000).reshape(10, 10, 10) |
1008 | | - name = 'raw' |
1009 | | - |
1010 | | - store, _ = self.create_store() |
1011 | | - f = open_group(store, mode='w') |
1012 | | - |
1013 | | - # cannot specify dimension_separator that conflicts with the store |
1014 | | - with pytest.raises(ValueError): |
1015 | | - f.create_dataset(name, data=data, chunks=(5, 5, 5), |
1016 | | - compressor=None, dimension_separator='.') |
1017 | | - |
1018 | | - |
1019 | 974 | class TestGroupWithZipStore(TestGroup): |
1020 | 975 |
|
1021 | 976 | @staticmethod |
|
0 commit comments