Closed dex6 closed 6 years ago
https://github.com/adamchainz/pytest-randomly supports xdist :)
Fixed.
I know it's an old and closed issue, but I seem to be having the same problem with
pytest-random-order==1.0.4
pytest-xdist==2.5.0
.
gw1:None (gw1)
Different tests were collected between gw0 and gw1. The difference is:
--- gw0
+++ gw1
@@ -1,276 +1,276 @@
...
Should I open a new issue?
Thanks for great plugin. However, there's one problem for me: my test suite uses xdist to run tests on multiple CPU cores, and it completely breaks with pytest-random-order.
Here's some fake tests to demonstrate the problem:
And here it is executed in two parallel processes:
It gets worse the more tests and CPU cores you have. I suppose that every subprocess generates a different seed and executes other test cases than it was expected to, because when a seed is specified using --random-order-seed, it always seem to work.