Skip to content

Commit d7f28a7

Browse files
committed
Ensure tmpdir is exited before cleaning it up, avoiding errors on Windows. Tests now pass on Windows
1 parent a15b5db commit d7f28a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

importlib_metadata/tests/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def save_cwd():
4343

4444
@contextlib.contextmanager
4545
def tempdir_as_cwd():
46-
with save_cwd():
47-
with tempdir() as tmp:
46+
with tempdir() as tmp:
47+
with save_cwd():
4848
os.chdir(str(tmp))
4949
yield tmp
5050

0 commit comments

Comments
 (0)