mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-42260: Add _PyInterpreterState_SetConfig() (GH-23158)
* Inline _PyInterpreterState_SetConfig(): replace it with _PyConfig_Copy(). * Add _PyErr_SetFromPyStatus() * Add _PyInterpreterState_GetConfigCopy() * Add a new _PyInterpreterState_SetConfig() function. * Add an unit which gets, modifies, and sets the config.
This commit is contained in:
parent
100964e031
commit
048a35659a
9 changed files with 189 additions and 16 deletions
|
@ -1394,6 +1394,15 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
self.check_all_configs("test_init_warnoptions", config, preconfig,
|
||||
api=API_PYTHON)
|
||||
|
||||
def test_init_set_config(self):
|
||||
config = {
|
||||
'_init_main': 0,
|
||||
'bytes_warning': 2,
|
||||
'warnoptions': ['error::BytesWarning'],
|
||||
}
|
||||
self.check_all_configs("test_init_set_config", config,
|
||||
api=API_ISOLATED)
|
||||
|
||||
def test_get_argc_argv(self):
|
||||
self.run_embedded_interpreter("test_get_argc_argv")
|
||||
# ignore output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue