pytest-xdist icon indicating copy to clipboard operation
pytest-xdist copied to clipboard

Fixed an issue with running the same test multiple times sequentially

Open yuvalino opened this issue 1 year ago • 6 comments

When pytest_runtest_protocol is called with item==nextitem multiple times, with a test that accepts some fixtures -> the second call forward raises an error.

This is caused in WorkerInteractor when the same test appears twice in a row in the queue.

So if this specific case occurs, ensure nextitem is called with None instead.

yuvalino avatar May 31 '24 20:05 yuvalino