[Python-checkins] bpo-35233: test_embed: fix filesystem encoding (GH-10597)

Victor Stinner webhook-mailer at python.org
Mon Nov 19 04:06:03 EST 2018


https://github.com/python/cpython/commit/0e1312c959dcfd0193ed0c7ab3fd45d440da6d78
commit: 0e1312c959dcfd0193ed0c7ab3fd45d440da6d78
branch: 3.7
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018年11月19日T10:05:55+01:00
summary:
bpo-35233: test_embed: fix filesystem encoding (GH-10597)
Fix InitConfigTests: if utf8_mode is enabled, the expected filesystem
encoding is UTF-8.
files:
M Lib/test/test_embed.py
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index e6c8c8070b86..89797d25c844 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -492,6 +492,8 @@ def test_init_from_config(self):
 'faulthandler': 1,
 }
 global_config = {
+ 'Py_FileSystemDefaultEncodeErrors': self.UTF8_MODE_ERRORS,
+ 'Py_FileSystemDefaultEncoding': 'utf-8',
 'Py_NoUserSiteDirectory': 0,
 }
 self.check_config("init_from_config", core_config, global_config)
@@ -510,13 +512,13 @@ def test_init_env(self):
 }
 global_config = {
 'Py_DontWriteBytecodeFlag': 1,
+ 'Py_FileSystemDefaultEncodeErrors': self.UTF8_MODE_ERRORS,
+ 'Py_FileSystemDefaultEncoding': 'utf-8',
 'Py_InspectFlag': 1,
 'Py_NoUserSiteDirectory': 1,
 'Py_OptimizeFlag': 2,
 'Py_UnbufferedStdioFlag': 1,
 'Py_VerboseFlag': 1,
- 'Py_FileSystemDefaultEncoding': 'utf-8',
- 'Py_FileSystemDefaultEncodeErrors': self.UTF8_MODE_ERRORS,
 }
 self.check_config("init_env", core_config, global_config)
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /