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

Method test_init_setpath

Lib/test/test_embed.py:1380–1400  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1378 })
1379
1380 def test_init_setpath(self):
1381 # Test Py_SetPath()
1382 config = self._get_expected_config()
1383 paths = config['config']['module_search_paths']
1384
1385 config = {
1386 'module_search_paths': paths,
1387 'prefix': '',
1388 'base_prefix': '',
1389 'exec_prefix': '',
1390 'base_exec_prefix': '',
1391 # The current getpath.c doesn't determine the stdlib dir
1392 # in this case.
1393 'stdlib_dir': '',
1394 }
1395 self.default_program_name(config)
1396 env = {'TESTPATH': os.path.pathsep.join(paths)}
1397
1398 self.check_all_configs("test_init_setpath", config,
1399 api=API_COMPAT, env=env,
1400 ignore_stderr=True)
1401
1402 def test_init_setpath_config(self):
1403 # Test Py_SetPath() with PyConfig

Callers

nothing calls this directly

Calls 4

_get_expected_configMethod · 0.95
default_program_nameMethod · 0.95
check_all_configsMethod · 0.95
joinMethod · 0.45

Tested by

no test coverage detected