Add exception handling to file cleanup

- Surpress errors caused by long file cleanup in older python environments
This commit is contained in:
Andrew Senetar 2021-08-19 20:45:35 -05:00
parent 922fc0342a
commit 74f2dff57b
Signed by: arsenetar
GPG Key ID: C63300DCE48AB2F1
1 changed files with 4 additions and 1 deletions

View File

@ -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