@@ -2484,14 +2484,21 @@ def test_store_has_bytes_values(self):
2484
2484
pass
2485
2485
2486
2486
2487
+ fsspec_mapper_kwargs = {
2488
+ "check" : True ,
2489
+ "create" : True ,
2490
+ "missing_exceptions" : None
2491
+ }
2492
+
2493
+
2487
2494
@pytest .mark .skipif (have_fsspec is False , reason = "needs fsspec" )
2488
2495
class TestArrayWithFSStore (TestArray ):
2489
2496
@staticmethod
2490
2497
def create_array (read_only = False , ** kwargs ):
2491
2498
path = mkdtemp ()
2492
2499
atexit .register (shutil .rmtree , path )
2493
2500
key_separator = kwargs .pop ('key_separator' , "." )
2494
- store = FSStore (path , key_separator = key_separator , auto_mkdir = True )
2501
+ store = FSStore (path , key_separator = key_separator , auto_mkdir = True , ** fsspec_mapper_kwargs )
2495
2502
cache_metadata = kwargs .pop ('cache_metadata' , True )
2496
2503
cache_attrs = kwargs .pop ('cache_attrs' , True )
2497
2504
write_empty_chunks = kwargs .pop ('write_empty_chunks' , True )
@@ -2511,15 +2518,15 @@ def expected(self):
2511
2518
2512
2519
2513
2520
@pytest .mark .skipif (have_fsspec is False , reason = "needs fsspec" )
2514
- class TestArrayWithFSStoreExistingFS (TestArray ):
2521
+ class TestArrayWithFSStoreFromFilesystem (TestArray ):
2515
2522
@staticmethod
2516
2523
def create_array (read_only = False , ** kwargs ):
2517
2524
from fsspec .implementations .local import LocalFileSystem
2518
2525
fs = LocalFileSystem (auto_mkdir = True )
2519
2526
path = mkdtemp ()
2520
2527
atexit .register (shutil .rmtree , path )
2521
2528
key_separator = kwargs .pop ('key_separator' , "." )
2522
- store = FSStore (path , fs = fs , key_separator = key_separator , create = True , check = True )
2529
+ store = FSStore (path , fs = fs , key_separator = key_separator , ** fsspec_mapper_kwargs )
2523
2530
cache_metadata = kwargs .pop ('cache_metadata' , True )
2524
2531
cache_attrs = kwargs .pop ('cache_attrs' , True )
2525
2532
write_empty_chunks = kwargs .pop ('write_empty_chunks' , True )
@@ -3165,7 +3172,12 @@ def create_array(array_path='arr1', read_only=False, **kwargs):
3165
3172
path = mkdtemp ()
3166
3173
atexit .register (shutil .rmtree , path )
3167
3174
key_separator = kwargs .pop ('key_separator' , "." )
3168
- store = FSStoreV3 (path , key_separator = key_separator , auto_mkdir = True )
3175
+ store = FSStoreV3 (
3176
+ path ,
3177
+ key_separator = key_separator ,
3178
+ auto_mkdir = True ,
3179
+ ** fsspec_mapper_kwargs
3180
+ )
3169
3181
cache_metadata = kwargs .pop ('cache_metadata' , True )
3170
3182
cache_attrs = kwargs .pop ('cache_attrs' , True )
3171
3183
write_empty_chunks = kwargs .pop ('write_empty_chunks' , True )
@@ -3185,15 +3197,15 @@ def expected(self):
3185
3197
3186
3198
3187
3199
@pytest .mark .skipif (have_fsspec is False , reason = "needs fsspec" )
3188
- class TestArrayWithFSStoreV3ExistingFS (TestArrayWithPathV3 , TestArrayWithFSStore ):
3200
+ class TestArrayWithFSStoreV3FromFilesystem (TestArrayWithPathV3 , TestArrayWithFSStore ):
3189
3201
@staticmethod
3190
3202
def create_array (array_path = 'arr1' , read_only = False , ** kwargs ):
3191
3203
from fsspec .implementations .local import LocalFileSystem
3192
3204
fs = LocalFileSystem (auto_mkdir = True )
3193
3205
path = mkdtemp ()
3194
3206
atexit .register (shutil .rmtree , path )
3195
3207
key_separator = kwargs .pop ('key_separator' , "." )
3196
- store = FSStoreV3 (path , fs = fs , key_separator = key_separator , create = True , check = True )
3208
+ store = FSStoreV3 (path , fs = fs , key_separator = key_separator , ** fsspec_mapper_kwargs )
3197
3209
cache_metadata = kwargs .pop ('cache_metadata' , True )
3198
3210
cache_attrs = kwargs .pop ('cache_attrs' , True )
3199
3211
write_empty_chunks = kwargs .pop ('write_empty_chunks' , True )
0 commit comments