Skip to content

Commit

Permalink
fix test teardown flakiness.
Browse files Browse the repository at this point in the history
  • Loading branch information
filiplajszczak committed Feb 14, 2022
1 parent f0d598a commit 0827415
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def fake_home(local_pip_cache):
os.environ["HOME"] = str(tempdir)
yield tempdir
os.environ["HOME"] = old_home
shutil.rmtree(str(tempdir))
shutil.rmtree(str(tempdir), ignore_errors=True)

new_stuff = set(Path(old_home).iterdir()) - old_home_contents
if new_stuff:
Expand All @@ -62,7 +62,7 @@ def virtualenvs_folder():
os.environ["WORKON_HOME"] = old_workon
else:
del os.environ["WORKON_HOME"]
shutil.rmtree(str(tempdir))
shutil.rmtree(str(tempdir), ignore_errors=True)

if actual_virtualenvs.is_dir():
new_envs = set(actual_virtualenvs.iterdir()) - set(old_virtualenvs)
Expand Down

0 comments on commit 0827415

Please sign in to comment.