Replies: 3 comments
-
pytest doesn't run anything in parallel. There's the pytest-xdist plugin that allows doing so, but that uses processes and not threads. |
Beta Was this translation helpful? Give feedback.
-
take a look on the docs here
Results: test2 and test3 run parallel, test1 runs sequential (in a separated group) |
Beta Was this translation helpful? Give feedback.
-
Closing this as pytest is not using threads and no details suggesting their origin was provided |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a file with several dozen test_xx functions.
They appear to be run in parallel by PyTest, and since one underlying library isn't thread safe - these tests fail intermittently.
One way to fix this is to add thread locking into each of test_xx procedures, but this would be a lot of changes.
Is there a way to set an option instructing PyTest to run these tests sequentially?
Beta Was this translation helpful? Give feedback.
All reactions