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
This commit is contained in:
Eric Snow 2023-02-06 15:53:31 -07:00 committed by GitHub
parent 38752760c9
commit 914f8fd9f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View file

@ -1413,6 +1413,9 @@ def callback():
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))