MCPcopy Index your code
hub / github.com/python/cpython / test_c_api

Method test_c_api

Lib/test/test_build_details.py:165–174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

163 "Android and iOS run tests via a custom testbed method that doesn't ship headers"
164 )
165 def test_c_api(self):
166 value = self.key('c_api')
167
168 # Skip check if installation is relocated
169 if sysconfig._installation_is_relocated():
170 self.skipTest("Installation is relocated")
171
172 self.assertTrue(os.path.exists(os.path.join(value['headers'], 'Python.h')))
173 version = sysconfig.get_config_var('VERSION')
174 self.assertTrue(os.path.exists(os.path.join(value['pkgconfig_path'], f'python-{version}.pc')))
175
176
177@unittest.skipIf(

Callers

nothing calls this directly

Calls 5

skipTestMethod · 0.80
assertTrueMethod · 0.80
keyMethod · 0.45
existsMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected