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

Add environment variable with index of process/thread

Open maxmcd opened this issue 4 years ago • 1 comments

pytest-xdist has PYTEST_XDIST_WORKER which we use to create a unique DB for each thread. Could pytest-parallel provide something similar?

Happy to work on this if there is interest

maxmcd avatar May 23 '20 22:05 maxmcd

Added this: https://github.com/voltusdev/pytest-parallel/commit/868f69dcb1f80ec4e7c3d4030195d0e9a224419e

Strangely, the value stored in this variable disappears near the end of the test run. Not sure if that's due to an issue with this implementation or something else in my environment.

maxmcd avatar May 24 '20 00:05 maxmcd