gh-112535: Add test on _Py_ThreadId() (#112709)

Add also test.support.Py_GIL_DISABLED constant.
This commit is contained in:
Victor Stinner 2023-12-04 23:40:06 +01:00 committed by GitHub
parent a8ce149628
commit c5fa8a54db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 8 deletions

View file

@ -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):