Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test also PyThread_get_thread_native_id
  • Loading branch information
vstinner committed Jan 12, 2022
commit c5c71028afc00c133104de7f1562acec71126b62
12 changes: 7 additions & 5 deletions Lib/test/test_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,14 @@ def test_Py_CompileString(self):
expected = compile(code, "<string>", "exec")
self.assertEqual(result.co_consts, expected.co_consts)

def test_export_frozenmain(self):
# bpo-44133: Ensure that the "Py_FrozenMain" symbol is exported
# by the Python (directly by the binary, or via by the Python dynamic
# library).
def test_export_symbols(self):
# bpo-44133: Ensure that the "Py_FrozenMain" and
# "PyThread_get_thread_native_id" symbols are exported by the Python
# (directly by the binary, or via by the Python dynamic library).
ctypes = import_helper.import_module('ctypes')
self.assertTrue(hasattr(ctypes.pythonapi, 'Py_FrozenMain'))
for name in ('Py_FrozenMain', 'PyThread_get_thread_native_id'):
with self.subTest(name=name):
self.assertTrue(hasattr(ctypes.pythonapi, name))


class TestPendingCalls(unittest.TestCase):
Expand Down