From 1051147a3adbac26a30bf8adb98d6c31e614044e Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 18 Jun 2025 14:21:14 +0800 Subject: [PATCH] gh-134632: Add iOS/Android test skip for C API check for headers. (GH-135656) iOS and Android don't ship headers in the testbed, so we can't test for their existence. (cherry picked from commit 1c7efaf58a62d848421b2da97360ba3df7d7856b) Co-authored-by: Russell Keith-Magee --- Lib/test/test_build_details.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_build_details.py b/Lib/test/test_build_details.py index 33ade161fb5058..ba4b8c5aa9b58e 100644 --- a/Lib/test/test_build_details.py +++ b/Lib/test/test_build_details.py @@ -117,13 +117,20 @@ def test_location(self): # Override generic format tests with tests for our specific implemenation. @needs_installed_python - @unittest.skipIf(is_android or is_apple_mobile, 'Android and iOS run tests via a custom testbed method that changes sys.executable') + @unittest.skipIf( + is_android or is_apple_mobile, + 'Android and iOS run tests via a custom testbed method that changes sys.executable' + ) def test_base_interpreter(self): value = self.key('base_interpreter') self.assertEqual(os.path.realpath(value), os.path.realpath(sys.executable)) @needs_installed_python + @unittest.skipIf( + is_android or is_apple_mobile, + "Android and iOS run tests via a custom testbed method that doesn't ship headers" + ) def test_c_api(self): value = self.key('c_api') self.assertTrue(os.path.exists(os.path.join(value['headers'], 'Python.h')))