mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-35233: InitConfigTests tests more config vars (GH-10541)
test_embed.InitConfigTests tests more configuration variables. Changes: * InitConfigTests tests more core configuration variables: * base_exec_prefix * base_prefix * exec_prefix * home * legacy_windows_fs_encoding * legacy_windows_stdio * module_search_path_env * prefix * "_testembed init_from_config" tests more variables: * argv * warnoptions * xoptions * InitConfigTests: add check_global_config(), check_core_config() and check_main_config() subfunctions to cleanup the code. Move also constants at the class level (ex: COPY_MAIN_CONFIG). * Fix _PyCoreConfig_AsDict(): don't set stdio_encoding twice * Use more macros in _PyCoreConfig_AsDict() and _PyMainInterpreterConfig_AsDict() to reduce code duplication. * Other minor cleanups.
This commit is contained in:
parent
64313478bc
commit
01de89cb59
6 changed files with 273 additions and 238 deletions
|
@ -37,6 +37,7 @@ PyAPI_FUNC(void) _PyMainInterpreterConfig_Clear(_PyMainInterpreterConfig *);
|
|||
PyAPI_FUNC(int) _PyMainInterpreterConfig_Copy(
|
||||
_PyMainInterpreterConfig *config,
|
||||
const _PyMainInterpreterConfig *config2);
|
||||
/* Used by _testcapi.get_main_config() */
|
||||
PyAPI_FUNC(PyObject*) _PyMainInterpreterConfig_AsDict(
|
||||
const _PyMainInterpreterConfig *config);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue