File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,13 @@ async def delete(self, key: str) -> None:
208
208
else :
209
209
await asyncio .to_thread (path .unlink , True ) # Q: we may want to raise if path is missing
210
210
211
+ async def delete_dir (self , key : str ) -> None :
212
+ # docstring inherited
213
+ self ._check_writable ()
214
+ path = self .root / key
215
+ if path .is_dir ():
216
+ shutil .rmtree (path )
217
+
211
218
async def exists (self , key : str ) -> bool :
212
219
# docstring inherited
213
220
path = self .root / key
Original file line number Diff line number Diff line change 5
5
)
6
6
7
7
from zarr .abc .store import Store
8
- from zarr .storage import ZipStore
8
+ from zarr .storage import LocalStore , ZipStore
9
9
from zarr .testing .stateful import ZarrHierarchyStateMachine , ZarrStoreStateMachine
10
10
11
11
pytestmark = pytest .mark .slow_hypothesis
@@ -28,4 +28,6 @@ def mk_test_instance_sync() -> None:
28
28
if isinstance (sync_store , ZipStore ):
29
29
pytest .skip (reason = "ZipStore does not support delete" )
30
30
31
+ if isinstance (sync_store , LocalStore ):
32
+ pytest .skip (reason = "Test isn't suitable for LocalStore." )
31
33
run_state_machine_as_test (mk_test_instance_sync )
You can’t perform that action at this time.
0 commit comments