bpo-35233: Fix test_embed.InitConfigTests on macOS (GH-10539)

On macOS and Windows, Py_HasFileSystemDefaultEncoding is 1 by
default.
This commit is contained in:
Victor Stinner 2018-11-14 11:36:47 +01:00 committed by GitHub
parent 88cbea4c6f
commit bc09ee8bc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,9 +287,10 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'Py_VerboseFlag': 0,
}
if os.name == 'nt':
DEFAULT_GLOBAL_CONFIG['Py_HasFileSystemDefaultEncoding'] = 1
DEFAULT_GLOBAL_CONFIG['Py_LegacyWindowsFSEncodingFlag'] = 0
DEFAULT_GLOBAL_CONFIG['Py_LegacyWindowsStdioFlag'] = 0
if sys.platform in ('win32', 'darwin'):
DEFAULT_GLOBAL_CONFIG['Py_HasFileSystemDefaultEncoding'] = 1
DEFAULT_CORE_CONFIG = {
'install_signal_handlers': 1,