aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-12-04 23:40:06 +0100
committerGitHub <noreply@github.com>2023-12-04 22:40:06 +0000
commitc5fa8a54dbdf564d482e2e3857aa3efa61edd329 (patch)
tree9ccea9297f4d21823ea5ed7fb045f1d97b3ce988 /Lib/test/test_sys.py
parenta8ce149628c9eaafb8c38fbf25fbd1ed483d2902 (diff)
downloadcpython-c5fa8a54dbdf564d482e2e3857aa3efa61edd329.tar.gz
cpython-c5fa8a54dbdf564d482e2e3857aa3efa61edd329.zip
gh-112535: Add test on _Py_ThreadId() (#112709)
Add also test.support.Py_GIL_DISABLED constant.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 8c2c1a40f74..db5ba16c4d9 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1224,9 +1224,7 @@ class SysModuleTest(unittest.TestCase):
@test.support.cpython_only
@unittest.skipUnless(hasattr(sys, 'abiflags'), 'need sys.abiflags')
def test_disable_gil_abi(self):
- abi_threaded = 't' in sys.abiflags
- py_gil_disabled = (sysconfig.get_config_var('Py_GIL_DISABLED') == 1)
- self.assertEqual(py_gil_disabled, abi_threaded)
+ self.assertEqual('t' in sys.abiflags, support.Py_GIL_DISABLED)
@test.support.cpython_only