We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to perform the particular action only once per test run. As mentioned here, it can be done by checking, that now it's a master worker. https://pytest-xdist.readthedocs.io/en/latest/how-to.html#making-session-scoped-fixtures-execute-only-once
But there is no worker with id = "master".
Here is my code:
@fixture(scope="session", autouse=True) def session_setup(self, worker_id): if worker_id == "master": print()
BTW, there is no master worker only when I'm running tests in parallel with flag -n 2 or more.
-n 2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to perform the particular action only once per test run.
As mentioned here, it can be done by checking, that now it's a master worker.
https://pytest-xdist.readthedocs.io/en/latest/how-to.html#making-session-scoped-fixtures-execute-only-once
But there is no worker with id = "master".
Here is my code:
BTW, there is no master worker only when I'm running tests in parallel with flag
-n 2
or more.The text was updated successfully, but these errors were encountered: