Replies: 1 comment
-
Xdist is currently the only game in town that correctly passes reports between processes It currently has no feature to spin up processes for single tests Forked is a hack that can't quite work correctly which is why it was taken out of xdist and put into the unmaintained state |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I tried to use pytest internals to create a marker whose goal is to run a test in a subprocess.
pytest-forked is not a solution, because the required test involves CUDA initialization that can only be done in a subprocess and pytest-xdist runs all the tests in a subprocess.
This is the current implementation :
But using pytest 8.3.5, I get the following error message when running the next test:
The runner's stack is:
Note that the marked tests is in test_inverse.py, and the test that produce the error is in another module.
How should I propertly teardown the test, I've looked at pytest-forked implementation, but I didn't see any teardown.
Beta Was this translation helpful? Give feedback.
All reactions