summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cppext
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-12-04 22:40:06 (GMT)
committerGitHub <noreply@github.com>2023-12-04 22:40:06 (GMT)
commitc5fa8a54dbdf564d482e2e3857aa3efa61edd329 (patch)
tree9ccea9297f4d21823ea5ed7fb045f1d97b3ce988 /Lib/test/test_cppext
parenta8ce149628c9eaafb8c38fbf25fbd1ed483d2902 (diff)
downloadcpython-c5fa8a54dbdf564d482e2e3857aa3efa61edd329.zip
cpython-c5fa8a54dbdf564d482e2e3857aa3efa61edd329.tar.gz
cpython-c5fa8a54dbdf564d482e2e3857aa3efa61edd329.tar.bz2
gh-112535: Add test on _Py_ThreadId() (#112709)
Add also test.support.Py_GIL_DISABLED constant.
Diffstat (limited to 'Lib/test/test_cppext')
-rw-r--r--Lib/test/test_cppext/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_cppext/__init__.py b/Lib/test/test_cppext/__init__.py
index 299a16a..c6039bd 100644
--- a/Lib/test/test_cppext/__init__.py
+++ b/Lib/test/test_cppext/__init__.py
@@ -2,7 +2,6 @@
# compatible with C++ and does not emit C++ compiler warnings.
import os.path
import shutil
-import sys
import unittest
import subprocess
import sysconfig
@@ -15,7 +14,7 @@ SETUP = os.path.join(os.path.dirname(__file__), 'setup.py')
# gh-110119: pip does not currently support 't' in the ABI flag use by
# --disable-gil builds. Once it does, we can remove this skip.
-@unittest.skipIf(sysconfig.get_config_var('Py_GIL_DISABLED') == 1,
+@unittest.skipIf(support.Py_GIL_DISABLED,
'test does not work with --disable-gil')
@support.requires_subprocess()
class TestCPPExt(unittest.TestCase):