Use of random generator in timer test breaks parallel pytest
Issue #932
resolved
pytest can't be run in parallel with the random generator used in the test test_decorator_functionality
in test_timer.py
. With different test signatures on different processes it seems pytest can't allocate test to processes.
In any case, the test is super cryptic. Simple is best. It's not meant to be a puzzle.
@blechta
Comments (6)
-
-
reporter Not MPI parallelism, but pytest-xdist parallelism which divides tests between threads. See https://docs.pytest.org/en/3.0.0/xdist.html#speed-up-test-runs-by-sending-tests-to-multiple-cpus.
-
reporter @blechta Can you fix this today? It's blocking getting a substantial speedup with the unit tests.
-
Yes.
-
Quick fix in next: 800b310.
-
- changed status to resolved
Fixed by ea41a13.
- Log in to comment
Yes, the test looks cryptic. I will try to simplify it.
Can you tell me how to do reproduce the problem? The test wasn't failing in parallel before. Or do you mean something else than MPI parallelism?