summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-04-03 13:11:36 (GMT)
committerGitHub <noreply@github.com>2024-04-03 13:11:36 (GMT)
commitea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e (patch)
tree7fc58f8dcd7513427c7ea2ff9d7bad523be1118a /Tools
parent2ec6bb4111d2c03c1cac02b27c74beee7e5a2a05 (diff)
downloadcpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.zip
cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.tar.gz
cpython-ea94b3b149eeadf33c2f7c46f16dcda0adc7cf4e.tar.bz2
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/build/stable_abi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/build/stable_abi.py b/Tools/build/stable_abi.py
index 95fc4df..8b01c91 100644
--- a/Tools/build/stable_abi.py
+++ b/Tools/build/stable_abi.py
@@ -275,7 +275,10 @@ def gen_ctypes_test(manifest, args, outfile):
import sys
import unittest
from test.support.import_helper import import_module
- from _testcapi import get_feature_macros
+ try:
+ from _testcapi import get_feature_macros
+ except ImportError:
+ raise unittest.SkipTest("requires _testcapi")
feature_macros = get_feature_macros()