mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-36763: Add _PyCoreConfig.configure_c_stdio (GH-13363)
Add tests for configure_c_stdio and pathconfig_warnings parameters.
This commit is contained in:
parent
9ef5dcaa0b
commit
54b43bb3bb
4 changed files with 37 additions and 3 deletions
|
@ -360,6 +360,8 @@ static int test_init_global_config(void)
|
|||
putenv("PYTHONUNBUFFERED=");
|
||||
Py_UnbufferedStdioFlag = 1;
|
||||
|
||||
Py_FrozenFlag = 1;
|
||||
|
||||
/* FIXME: test Py_LegacyWindowsFSEncodingFlag */
|
||||
/* FIXME: test Py_LegacyWindowsStdioFlag */
|
||||
|
||||
|
@ -481,6 +483,8 @@ static int test_init_from_config(void)
|
|||
Py_QuietFlag = 0;
|
||||
config.quiet = 1;
|
||||
|
||||
config.configure_c_stdio = 0;
|
||||
|
||||
putenv("PYTHONUNBUFFERED=");
|
||||
Py_UnbufferedStdioFlag = 0;
|
||||
config.buffered_stdio = 0;
|
||||
|
@ -501,6 +505,9 @@ static int test_init_from_config(void)
|
|||
|
||||
config.check_hash_pycs_mode = L"always";
|
||||
|
||||
Py_FrozenFlag = 0;
|
||||
config.pathconfig_warnings = 0;
|
||||
|
||||
err = _Py_InitializeFromConfig(&config);
|
||||
if (_Py_INIT_FAILED(err)) {
|
||||
_Py_ExitInitError(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue