Skip to content

Commit e90dc92

Browse files
committed
fix: ensure to cleanup the test directory
1 parent 4de323b commit e90dc92

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def test_dir(monkeypatch):
5151
monkeypatch.setattr(
5252
pywrangler_utils, "find_pyproject_toml", lambda: test_dir / "pyproject.toml"
5353
)
54-
yield test_dir.absolute()
54+
55+
try:
56+
yield test_dir.absolute()
57+
finally:
58+
shutil.rmtree(test_dir, ignore_errors=True)
5559

5660

5761
def create_test_pyproject(test_dir: Path, dependencies=None):

0 commit comments

Comments
 (0)