bpo-35233: test_embed: fix filesystem encoding (GH-10597)
Fix InitConfigTests: if utf8_mode is enabled, the expected filesystem
encoding is UTF-8.
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index e6c8c80..89797d2 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -492,6 +492,8 @@
'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 @@
}
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)