pytest
pytest copied to clipboard
Since 8.2.0, automatic multiprocessing causes race conditions in my project
I got a project that cannot be tested with parallelism, as it requires exclusive access to some resources. Unfortunately, this also applies during unit testing. This wasn't a problem up to pytest 8.1.2, but it is since 8.2.0. Since 8.2.0, pytest instantly spawns six child processes, which are blocking each other. I couldn't find a switch to turn this off nor could I identify the PR that caused this (yet).
More context needed
Core pytest doesn't start processes at all
Hello, in our case (I and @pramodk that link the issue above):
We have reproducible segfaults with pytest 8.2.0
on our code.
Once we set pytest back to 8.1.1
it works again.
Running with pytest 8.2.0
with -v
or by specifying all files instead of the directory works too (pytest dir/file1.py dir/file2.py
instead of pytest dir
).
This issue is stale because it has the status: needs information
label and requested follow-up information was not provided for 14 days.
This issue was closed because it has the status: needs information
label and follow-up information has not been provided for 7 days since being marked as stale.
I couldn't generate a minimal failing example yet. I'd like to reopen the issue soon.
Am So., 26. Mai 2024 um 03:52 Uhr schrieb github-actions[bot] < @.***>:
This issue was closed because it has the status: needs information label and follow-up information has not been provided for 7 days since being marked as stale.
— Reply to this email directly, view it on GitHub https://github.com/pytest-dev/pytest/issues/12278#issuecomment-2131937125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIM6TNNZN6BDHC36LPWKA2DZEE56TAVCNFSM6AAAAABHACBRKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZRHEZTOMJSGU . You are receiving this because you authored the thread.Message ID: @.***>
@fossdd What is "this" exactly? As already mentioned, pytest doesn't do any parallelism itself. As for black, it runs pytest 8.2.0 on CI just fine... I also tried running the waitress tests locally with pytest 8.2.1 and they work fine.
Please be more specific - what exactly is happening? Are you sure it's related to this issue at all?