Closed WilliamsChueh closed 4 years ago
I can reproduce this.
I first tried using this plugin by passing its parameters through pytest.main and it complains that the file cannot be found. Using it through the command line seems to work fine.
pytest.main(['--tests-per-worker 4'])
You are using a single argument there, try/use ['--tests-per-worker', '4']
.
@blueyed is correct. Please reply if the issue persists.
I used command line to execute is working.(ex. pytest --tests-per-worker 4) But if i used pytest.main(['--tests-per-worker 4']) to execute will be fail. Fail message is below (Enviroment:Windows 7)
plugins: xdist-1.26.1, parallel-0.0.9, metadata-1.8.0, json-report-1.0.3, forked-1.0.2 collecting ... =================================================================================================== no tests ran in 0.00 seconds =================================================================================================== ERROR: file not found: --tests-per-worker 4
Code def test_Execute(): pytest.main(['--tests-per-worker 4'])
if name == 'main': test_Execute()