mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
bpo-29778: test_embed tests the path configuration (GH-21306)
This commit is contained in:
parent
6ae2780be0
commit
8f42748ded
5 changed files with 154 additions and 62 deletions
|
@ -868,9 +868,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2)
|
|||
static PyObject *
|
||||
config_as_dict(const PyConfig *config)
|
||||
{
|
||||
PyObject *dict;
|
||||
|
||||
dict = PyDict_New();
|
||||
PyObject *dict = PyDict_New();
|
||||
if (dict == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -2643,6 +2641,16 @@ _Py_GetConfigsAsDict(void)
|
|||
}
|
||||
Py_CLEAR(dict);
|
||||
|
||||
/* path config */
|
||||
dict = _PyPathConfig_AsDict();
|
||||
if (dict == NULL) {
|
||||
goto error;
|
||||
}
|
||||
if (PyDict_SetItemString(result, "path_config", dict) < 0) {
|
||||
goto error;
|
||||
}
|
||||
Py_CLEAR(dict);
|
||||
|
||||
return result;
|
||||
|
||||
error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue