Parallel tests and retries¶
Use the passing example from the tutorial.
Install the optional plugins separately:
-n 2 uses two worker processes. --reruns=1 allows one retry after a failure.
Our restored passing example has nothing to retry. With a failing-then-passing
test, pytest may exit 0 while this reporter still records an earlier failure;
see the status table below. The main process writes one report. Results can arrive
in a different order. With --dist=each, the same node observed on two workers
is retained as two worker attempts.