Closed pablogsal closed 2 years ago
pytest-xdist allows distributing tests across multiple hosts, as well. Should we detect when it was run in that mode and warn or fail?
pytest-xdist allows distributing tests across multiple hosts, as well. Should we detect when it was run in that mode and warn or fail?
Hummm. I would need to investigate. Do you mind if we do this in a another PR?
I have addressed all comments, please take another look
The pytest-xdist plugin spawns worker processes that run the tests while the main process reports the results. As every process has its own copy of all the plugins, this means that when the main process reports the final summary, it doesn't have access to the results stored by every individual test so the plugin is unable to print the summary.
To make ourselves compatible with pytest-xdist, we make the main process and the workers use a common path to store the metadata and result files (this is communicated from the main process to the workers by an environment variable). Then, at report time, if the main process doesn't have any result data, it will fetch it from this directory instead.
Closes: #2