We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4f97d1 commit 65b719eCopy full SHA for 65b719e
1 file changed
tests/test_api.py
@@ -94,11 +94,18 @@ def test_some_slices_local_output_to_non_existing_dir(self):
94
]
95
for uri in slices:
96
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)
+ try:
+ with pytest.raises(
+ FileNotFoundError,
+ match=(
+ "\\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)
109
110
def test_some_slices_with_class_slice_source(self):
111
target_dir = "memory://target.zarr"
0 commit comments