Skip to content

Commit

Permalink
try finally rmtree
Browse files Browse the repository at this point in the history
Co-authored-by: Moritz E. Beber <midnighter@posteo.net>
  • Loading branch information
sneakers-the-rat and Midnighter committed Nov 1, 2024
1 parent 83405ce commit 86b8c66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ def cleanup_hatch_envs(
hatch_dir = tmp_path_factory.mktemp("hatch")
monkeypatch_session.setenv("HATCH_DATA_DIR", str(hatch_dir))

yield

shutil.rmtree(hatch_dir, ignore_errors=True)
try:
yield
finally:
shutil.rmtree(hatch_dir, ignore_errors=True)

# ---------------------------------------------
# Fixtures - exports
Expand Down

0 comments on commit 86b8c66

Please sign in to comment.