Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-43795: Add a test for Stable ABI symbol availability using ctypes #26354

Merged
merged 7 commits into from
Oct 22, 2021
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
Skip test when _ctypes is not available
  • Loading branch information
encukou committed Jun 1, 2021
commit 39446ab6efb03dfb7fc6f196a4f83a5cae35c6c0
6 changes: 4 additions & 2 deletions Lib/test/test_stable_abi_ctypes.py
Original file line number Diff line number Diff line change
@@ -5,13 +5,15 @@
"""

import unittest
from ctypes import pythonapi
from test.support.import_helper import import_module

ctypes_test = import_module('ctypes')

class TestStableABIAvailability(unittest.TestCase):
def test_available_symbols(self):
for symbol_name in SYMBOL_NAMES:
with self.subTest(symbol_name):
pythonapi[symbol_name]
ctypes_test.pythonapi[symbol_name]

SYMBOL_NAMES = (

6 changes: 4 additions & 2 deletions Tools/scripts/stable_abi.py
Original file line number Diff line number Diff line change
@@ -270,13 +270,15 @@ def gen_ctypes_test(manifest, args, outfile):
"""

import unittest
from ctypes import pythonapi
from test.support.import_helper import import_module

ctypes_test = import_module('ctypes')

class TestStableABIAvailability(unittest.TestCase):
def test_available_symbols(self):
for symbol_name in SYMBOL_NAMES:
with self.subTest(symbol_name):
pythonapi[symbol_name]
ctypes_test.pythonapi[symbol_name]

SYMBOL_NAMES = (
'''))