File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,18 @@ def test_some_slices_local_output_to_non_existing_dir(self):
9494 ]
9595 for uri in slices :
9696 make_test_dataset (uri = uri )
97- with pytest .raises (
98- FileNotFoundError ,
99- match = "\\ ATarget parent directory does not exist: .*/non_existent_dir\\ Z" ,
100- ):
101- zappend (slices , target_dir = target_dir )
97+ try :
98+ with pytest .raises (
99+ FileNotFoundError ,
100+ match = (
101+ "\\ ATarget parent directory does not exist: .*/non_existent_dir\\ Z"
102+ ),
103+ ):
104+ zappend (slices , target_dir = target_dir )
105+ finally :
106+ shutil .rmtree (target_dir , ignore_errors = True )
107+ for slice_dir in slices :
108+ shutil .rmtree (slice_dir , ignore_errors = True )
102109
103110 def test_some_slices_with_class_slice_source (self ):
104111 target_dir = "memory://target.zarr"
You can’t perform that action at this time.
0 commit comments