Quansight-Labs / pytest-run-parallel

A simple pytest plugin to run tests concurrently
MIT License
6 stars 2 forks source link

Autodetect hypothesis use and suggest marking as thread-unsafe #20

Open ngoldbaum opened 4 days ago

ngoldbaum commented 4 days ago

In the vein of https://github.com/Quansight-Labs/pytest-run-parallel/issues/17.

See https://github.com/Quansight-Labs/free-threaded-compatibility/issues/116

lysnikolaou commented 2 days ago

I'm a bit confused. Do you mean that pytest-run-parallel should suggest marking it as thread-unsafe by outputting a message somewhere or that it should do it?

rgommers commented 2 days ago

No message I think, just apply the thread_unsafe marker so any tests using hypothesis are not run in parallel, since that's just as unsafe as, for example, pytest.warns it looks like.

lysnikolaou commented 2 days ago

Got it. I just wanted to make sure we're aligned on that because of the wording "and suggest marking as thread-unsafe" in the issue title.

ngoldbaum commented 2 days ago

Sorry, that was me misunderstanding how pytest-run-parallel handles pytest.warns.