[Python-checkins] bpo-35233: Fix test_embed.InitConfigTests on macOS (GH-10539)
Victor Stinner
webhook-mailer at python.org
Wed Nov 14 05:36:59 EST 2018
https://github.com/python/cpython/commit/bc09ee8bc9c0ce4873cdaab6ca524a3ee3a36be1
commit: bc09ee8bc9c0ce4873cdaab6ca524a3ee3a36be1
branch: 3.7
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-11-14T11:36:47+01:00
summary:
bpo-35233: Fix test_embed.InitConfigTests on macOS (GH-10539)
On macOS and Windows, Py_HasFileSystemDefaultEncoding is 1 by
default.
files:
M Lib/test/test_embed.py
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 856116fdbb17..6e2e212105f3 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -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,
More information about the Python-checkins
mailing list