diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/conftest.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/conftest.py b/test/conftest.py index 87471287..ea3aaf72 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -328,7 +328,14 @@ def run(request): ): os.remove(path) else: - shutil.rmtree(path) + for attempt in range(10): + try: + shutil.rmtree(path) + break + except OSError as err: + if err.errno != 16: + raise + time.sleep(1) # check descriptors |