Complete the code to run tests in parallel using pytest.
pytest -n [1]Using -n 2 runs tests on 2 CPU cores in parallel, reducing total test time.
Complete the code to import the pytest-xdist plugin for parallel testing.
import [1]
The plugin name to import is pytest_xdist with underscore, enabling parallel test execution.
Fix the error in the pytest command to run tests in parallel on 3 CPUs.
pytest -n [1]The correct syntax is -n 3 with a number, not words or extra characters.
Fill both blanks to create a pytest command that runs tests in parallel and shows detailed output.
pytest [1] [2]
-q hides output, not shows it.--maxfail=1 stops tests early, not related to parallelism.-n 2 runs tests on 2 CPUs in parallel, and -v shows detailed test results.
Fill all three blanks to write a pytest command that runs tests in parallel on 4 CPUs, stops after 2 failures, and shows verbose output.
pytest [1] [2] [3]
-q instead of -v hides output.--maxfail means tests run even after many failures.-n 4 runs tests on 4 CPUs, --maxfail=2 stops after 2 failures, and -v shows detailed output.