Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytest-xdist crashes tests #100

Closed
mfreibergs opened this issue Feb 6, 2022 · 2 comments
Closed

pytest-xdist crashes tests #100

mfreibergs opened this issue Feb 6, 2022 · 2 comments

Comments

@mfreibergs
Copy link

Running tests with pytest-xdist in parallel doesn't correctly clean up the test-results folder and crashes the tests. Don't know if this can be fixed from playwright-pytest or pytest-xdist instead

@mfreibergs
Copy link
Author

mfreibergs commented Feb 6, 2022

# conftest.py
import shutil
import os

output_dir = "test-results"

def pytest_configure():
    if os.path.exists(output_dir):
        shutil.rmtree(output_dir)

Adding this fixes the current problem. There probably is a better solution.

@mxschmitt
Copy link
Member

Should be fixed by #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants