pytest -n 4 fails on the CI agent
QuizMediumPython only
pytest -n 4 works on your laptop. In CI it fails at once with "unrecognized arguments: -n" and exit code 4. Why?
- -n comes from the pytest-xdist plugin, which is installed on your laptop but missing from requirements.txt
- CI agents cannot run tests in parallel
- -n must be written after the test path
- Four tests failed
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.