Skip to content

Commit

Permalink
Add exception handling to file cleanup
Browse files Browse the repository at this point in the history
- Surpress errors caused by long file cleanup in older python environments
  • Loading branch information
arsenetar committed Aug 20, 2021
1 parent 922fc03 commit 74f2dff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_plat_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ def longdir(tmp_path):
dirname = "\\\\?\\" + str(tmp_path)
name = "A" * 100
yield op.join(dirname, name, name, name)
shutil.rmtree(dirname, ignore_errors=True)
try:
shutil.rmtree(dirname, ignore_errors=True)
except TypeError:
pass


@pytest.fixture
Expand Down

0 comments on commit 74f2dff

Please sign in to comment.