diff --git a/tests/conftest.py b/tests/conftest.py index f5ddb9f129..3e31b03ec3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,6 +7,8 @@ import contextlib import difflib import gc +import multiprocessing +import os import re import textwrap @@ -15,6 +17,9 @@ # Early diagnostic for failed imports import pybind11_tests +if os.name != "nt": + multiprocessing.set_start_method("spawn") + _long_marker = re.compile(r"([0-9])L") _hexadecimal = re.compile(r"0x[0-9a-fA-F]+") diff --git a/tests/test_gil_scoped.py b/tests/test_gil_scoped.py index e890a7b0c8..931e3af213 100644 --- a/tests/test_gil_scoped.py +++ b/tests/test_gil_scoped.py @@ -144,7 +144,7 @@ def _intentional_deadlock(): ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK = ALL_BASIC_TESTS + (_intentional_deadlock,) -SKIP_IF_DEADLOCK = True # See PR #4216 +SKIP_IF_DEADLOCK = False # See PR #4216 def _run_in_process(target, *args, **kwargs):