Pytest session scope fixture is not executed with xdist #8871
Unanswered
archana3112
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am reading command line arguments using request.config.getoption in a setup fixture, setup fixture is defined in conftest.py
Setup fixture is to be executed at start of the session, so scope of fixture is 'session' and autouse is set to true. Every thing works fine with serial execution.
When I used xdist with loadscope for parallel execution, setup fixture is not executed. I read may issues on forum where people claims that with xdist session scope fixtures are executed multiple times, in my case fixture not executed at all. I added print statement inside fixture to monitor the execution. It is executed only when xdist is not used.
Please help if anyone came across similar issue. I am using python 3.7
Beta Was this translation helpful? Give feedback.
All reactions