Skip to content

Commit 12e8dff

Browse files
committed
tests: always disable on the nogil build
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 8e0ea75 commit 12e8dff

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CMakePresets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"displayName": "Default",
77
"binaryDir": "build",
88
"generator": "Ninja",
9-
"errors": {
9+
"warnings": {
1010
"dev": true,
1111
"deprecated": true
1212
},

tests/test_gil_scoped.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import multiprocessing
44
import sys
5+
import sysconfig
56
import threading
67
import time
78

@@ -10,8 +11,9 @@
1011
import env
1112
from pybind11_tests import gil_scoped as m
1213

14+
1315
skipif_not_free_threaded = pytest.mark.skipif(
14-
not getattr(sys, "_is_gil_enabled", lambda: True)(),
16+
sysconfig.get_config_var("Py_GIL_DISABLED"),
1517
reason="Flaky without the GIL",
1618
)
1719

0 commit comments

Comments
 (0)