Run pytest tests in parallel
QuizMediumPython onlyAsked in: Swiggy
Which statements about pytest -n 4 are true? Choose all that apply.
- It needs the pytest-xdist plugin and runs tests in 4 separate worker processes (separate copies of Python)
- A session-scoped fixture runs once per worker, not once for the whole run
- Tests that share and change the same test data can interfere
- It runs every test four times
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.