Skip to content

Commit

Permalink
fix: catch PermissionError when cleaning the tests results with multi…
Browse files Browse the repository at this point in the history
…ple threads (#224) (#230)
  • Loading branch information
nck974 authored Jul 3, 2024
1 parent 6d624fc commit cd44e24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_playwright/pytest_playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def delete_output_dir(pytestconfig: Any) -> None:
if os.path.exists(output_dir):
try:
shutil.rmtree(output_dir)
except FileNotFoundError:
except (FileNotFoundError, PermissionError):
# When running in parallel, another thread may have already deleted the files
pass
except OSError as error:
Expand Down

0 comments on commit cd44e24

Please sign in to comment.