summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-02-06 22:53:31 (GMT)
committerGitHub <noreply@github.com>2023-02-06 22:53:31 (GMT)
commit914f8fd9f7fc5e48b54d938a68c932cc618ef3a6 (patch)
tree77f87c6c45f28a9795116b89c6fd7f2e2dd13306 /Lib/test/test_capi
parent38752760c91c87dd67af16d2cee611a22e647567 (diff)
downloadcpython-914f8fd9f7fc5e48b54d938a68c932cc618ef3a6.zip
cpython-914f8fd9f7fc5e48b54d938a68c932cc618ef3a6.tar.gz
cpython-914f8fd9f7fc5e48b54d938a68c932cc618ef3a6.tar.bz2
gh-59956: Add a Test to Verify GILState Matches the "Current" Thread State (gh-101625)
This test should have been in gh-101431. https://github.com/python/cpython/issues/59956
Diffstat (limited to 'Lib/test/test_capi')
-rw-r--r--Lib/test/test_capi/test_misc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py
index dace37c..03e22d7 100644
--- a/Lib/test/test_capi/test_misc.py
+++ b/Lib/test/test_capi/test_misc.py
@@ -1413,6 +1413,9 @@ class TestThreadState(unittest.TestCase):
ret = assert_python_ok('-X', 'tracemalloc', '-c', code)
self.assertIn(b'callback called', ret.out)
+ def test_gilstate_matches_current(self):
+ _testcapi.test_current_tstate_matches()
+
class Test_testcapi(unittest.TestCase):
locals().update((name, getattr(_testcapi, name))