Skip to content

Commit 13c1c14

Browse files
committed
Also xfail if macOS and PY_GIL_DISABLED, show SOABI
1 parent bb8a794 commit 13c1c14

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_gil_scoped.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,14 @@ def _run_in_process(target, *args, **kwargs):
199199
if process.exitcode is None:
200200
assert t_delta > 0.9 * timeout
201201
msg = "DEADLOCK, most likely, exactly what this test is meant to detect."
202+
soabi = sysconfig.get_config_var("SOABI")
202203
if env.WIN and env.PYPY:
203-
pytest.xfail("[TEST-GIL-SCOPED] Windows PyPy: " + msg)
204-
elif env.MACOS and not env.sys_is_gil_enabled():
205-
pytest.xfail("[TEST-GIL-SCOPED] macOS free-threading: " + msg)
204+
pytest.xfail(f"[TEST-GIL-SCOPED] {soabi} PyPy: " + msg)
205+
if env.MACOS:
206+
if not env.sys_is_gil_enabled():
207+
pytest.xfail(f"[TEST-GIL-SCOPED] {soabi} with GIL disabled: " + msg)
208+
if env.PY_GIL_DISABLED:
209+
pytest.xfail(f"[TEST-GIL-SCOPED] {soabi}: " + msg)
206210
raise RuntimeError(msg)
207211
return process.exitcode
208212
finally:

0 commit comments

Comments
 (0)