@@ -26,13 +26,13 @@ def create_zarray(shape=None, chunks=None, dtype="f8", store=None, chunk_store=N
26
26
return arr
27
27
28
28
29
- @pytest .mark .parametrize ("copy_arrays " , [True , False ])
29
+ @pytest .mark .parametrize ("memmap " , [True , False ])
30
30
@pytest .mark .parametrize ("lazy_load" , [True , False ])
31
31
@pytest .mark .parametrize ("compression" , ["input" , "zlib" ])
32
32
@pytest .mark .parametrize ("store_type" , [DirectoryStore , KVStore , MemoryStore , NestedDirectoryStore , TempStore ])
33
33
@pytest .mark .parametrize ("to_internal" , [True , False ])
34
34
@pytest .mark .parametrize ("meta_store" , [True , False ])
35
- def test_write_to (tmp_path , copy_arrays , lazy_load , compression , store_type , to_internal , meta_store ):
35
+ def test_write_to (tmp_path , memmap , lazy_load , compression , store_type , to_internal , meta_store ):
36
36
if store_type in (DirectoryStore , NestedDirectoryStore ):
37
37
store1 = store_type (tmp_path / "zarr_array_1" )
38
38
store2 = store_type (tmp_path / "zarr_array_2" )
@@ -66,7 +66,7 @@ def test_write_to(tmp_path, copy_arrays, lazy_load, compression, store_type, to_
66
66
af = asdf .AsdfFile (tree )
67
67
af .write_to (fn , all_array_compression = compression )
68
68
69
- with asdf .open (fn , mode = "r" , copy_arrays = copy_arrays , lazy_load = lazy_load ) as af :
69
+ with asdf .open (fn , mode = "r" , memmap = memmap , lazy_load = lazy_load ) as af :
70
70
for n , a in (("arr1" , arr1 ), ("arr2" , arr2 )):
71
71
assert isinstance (af [n ], zarr .core .Array )
72
72
if to_internal or store_type in (KVStore , MemoryStore , TempStore ):
@@ -76,10 +76,10 @@ def test_write_to(tmp_path, copy_arrays, lazy_load, compression, store_type, to_
76
76
assert numpy .allclose (af [n ], a )
77
77
78
78
79
- @pytest .mark .parametrize ("copy_arrays " , [True , False ])
79
+ @pytest .mark .parametrize ("memmap " , [True , False ])
80
80
@pytest .mark .parametrize ("lazy_load" , [True , False ])
81
81
@pytest .mark .parametrize ("with_update" , [True , False ])
82
- def test_modify (tmp_path , with_update , copy_arrays , lazy_load ):
82
+ def test_modify (tmp_path , with_update , memmap , lazy_load ):
83
83
# make a file
84
84
store = DirectoryStore (tmp_path / "zarr_array" )
85
85
arr = create_zarray (store = store )
@@ -89,7 +89,7 @@ def test_modify(tmp_path, with_update, copy_arrays, lazy_load):
89
89
af .write_to (fn )
90
90
91
91
# open the file, modify the array
92
- with asdf .open (fn , mode = "rw" , copy_arrays = copy_arrays , lazy_load = lazy_load ) as af :
92
+ with asdf .open (fn , mode = "rw" , memmap = memmap , lazy_load = lazy_load ) as af :
93
93
assert af ["arr" ][0 , 0 ] != 42
94
94
af ["arr" ][0 , 0 ] = 42
95
95
# now modify
@@ -100,7 +100,7 @@ def test_modify(tmp_path, with_update, copy_arrays, lazy_load):
100
100
af .update ()
101
101
102
102
# reopen the file, check for the modification
103
- with asdf .open (fn , mode = "rw" , copy_arrays = copy_arrays , lazy_load = lazy_load ) as af :
103
+ with asdf .open (fn , mode = "rw" , memmap = memmap , lazy_load = lazy_load ) as af :
104
104
assert af ["arr" ][0 , 0 ] == 42
105
105
106
106
0 commit comments