File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 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:
208208 else :
209209 await asyncio .to_thread (path .unlink , True ) # Q: we may want to raise if path is missing
210210
211+ async def delete_dir (self , prefix : str ) -> None :
212+ # docstring inherited
213+ self ._check_writable ()
214+ path = self .root / prefix
215+ if path .is_dir ():
216+ shutil .rmtree (path )
217+
211218 async def exists (self , key : str ) -> bool :
212219 # docstring inherited
213220 path = self .root / key
Original file line number Diff line number Diff line change 55)
66
77from zarr .abc .store import Store
8- from zarr .storage import ZipStore
8+ from zarr .storage import LocalStore , ZipStore
99from zarr .testing .stateful import ZarrHierarchyStateMachine , ZarrStoreStateMachine
1010
1111pytestmark = pytest .mark .slow_hypothesis
@@ -28,4 +28,6 @@ def mk_test_instance_sync() -> None:
2828 if isinstance (sync_store , ZipStore ):
2929 pytest .skip (reason = "ZipStore does not support delete" )
3030
31+ if isinstance (sync_store , LocalStore ):
32+ pytest .skip (reason = "Test isn't suitable for LocalStore." )
3133 run_state_machine_as_test (mk_test_instance_sync )
You can’t perform that action at this time.
0 commit comments