We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 358ba45 commit e133c33Copy full SHA for e133c33
tests/conftest.py
@@ -17,7 +17,12 @@
17
# Early diagnostic for failed imports
18
import pybind11_tests
19
20
-if os.name != "nt":
+
21
+@pytest.fixture(scope="session", autouse=True)
22
+def always_forkserver_on_unix():
23
+ if os.name == "nt":
24
+ return
25
26
# Full background: https://github.com/pybind/pybind11/issues/4105#issuecomment-1301004592
27
# In a nutshell: fork() after starting threads == flakiness in the form of deadlocks.
28
# It is actually a well-known pitfall, unfortunately without guard rails.
@@ -27,6 +32,7 @@
32
# running with defaults.
33
multiprocessing.set_start_method("forkserver")
29
34
35
30
36
_long_marker = re.compile(r"([0-9])L")
31
37
_hexadecimal = re.compile(r"0x[0-9a-fA-F]+")
38
0 commit comments