Complete the code to run tests in parallel using pytest's xdist plugin.
pytest.main(['-n', '[1]'])
Using '-n 2' tells pytest to run tests using 2 workers in parallel.
Complete the code to distribute tests by module using pytest xdist.
pytest.main(['-n', '3', '--dist=[1]'])
The '--dist=loadfile' option distributes tests by file, running all tests in a file on the same worker.
Fix the error in the pytest command to enable loadscope distribution with 4 workers.
pytest.main(['-n', '[1]', '--dist=loadscope'])
The number of workers must be a positive integer. '4' correctly sets 4 workers.
Fill both blanks to configure pytest to run 3 workers and distribute tests by scope.
pytest.main(['-n', '[1]', '--dist=[2]'])
Using '-n 3' runs 3 workers, and '--dist=loadscope' distributes tests by their scope.
Fill all three blanks to run pytest with 5 workers, distribute by file, and enable boxed mode.
pytest.main(['-n', '[1]', '--dist=[2]', '[3]'])
Using '-n 5' runs 5 workers, '--dist=loadfile' distributes tests by file, and '--boxed' runs tests in isolated subprocesses.