Skip to content

Commit cdad9a4

Browse files
committed
test_build_details: Add tests for the c_api section
1 parent bdae884 commit cdad9a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_build_details.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ def test_base_interpreter(self):
123123

124124
self.assertEqual(os.path.realpath(value), os.path.realpath(sys.executable))
125125

126+
@needs_installed_python
127+
def test_c_api(self):
128+
value = self.key('c_api')
129+
self.assertTrue(os.path.exists(os.path.join(value['headers'], 'Python.h')))
130+
if 'pkgconfig_path' in value:
131+
version = sysconfig.get_config_var('VERSION')
132+
self.assertTrue(os.path.exists(os.path.join(value['pkgconfig_path'], f'python-{version}.pc')))
133+
126134

127135
if __name__ == '__main__':
128136
unittest.main()

0 commit comments

Comments
 (0)