Skip to content

Commit cd44e24

Browse files
authored
fix: catch PermissionError when cleaning the tests results with multiple threads (#224) (#230)
1 parent 6d624fc commit cd44e24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_playwright/pytest_playwright.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def delete_output_dir(pytestconfig: Any) -> None:
7070
if os.path.exists(output_dir):
7171
try:
7272
shutil.rmtree(output_dir)
73-
except FileNotFoundError:
73+
except (FileNotFoundError, PermissionError):
7474
# When running in parallel, another thread may have already deleted the files
7575
pass
7676
except OSError as error:

0 commit comments

Comments
 (0)