]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-134632: Add iOS/Android test skip for C API check for headers. (#135656)
authorRussell Keith-Magee <russell@keith-magee.com>
Wed, 18 Jun 2025 06:21:14 +0000 (14:21 +0800)
committerGitHub <noreply@github.com>
Wed, 18 Jun 2025 06:21:14 +0000 (14:21 +0800)
iOS and Android don't ship headers in the testbed, so we can't test for their existence.

Lib/test/test_build_details.py

index 33ade161fb5058cb3476618d5e639d57517ab496..ba4b8c5aa9b58e1a9b86f3d55f898c1b03d36ae1 100644 (file)
@@ -117,13 +117,20 @@ class CPythonBuildDetailsTests(unittest.TestCase, FormatTestsBase):
     # 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')))