8000 bpo-35233: test_embed: fix filesystem encoding (GH-10597) · python/cpython@0e1312c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e1312c

Browse files
authored
bpo-35233: test_embed: fix filesystem encoding (GH-10597)
Fix InitConfigTests: if utf8_mode is enabled, the expected filesystem encoding is UTF-8.
1 parent ae02a92 commit 0e1312c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_embed.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,8 @@ def test_init_from_config(self):
492492
'faulthandler': 1,
493493
}
494494
global_config = {
495+
'Py_FileSystemDefaultEncodeErrors': self.UTF8_MODE_ERRORS,
496+
'Py_FileSystemDefaultEncoding': 'utf-8',
495497
'Py_NoUserSiteDirectory': 0,
496498
}
497499
self.check_config("init_from_config", core_config, global_config)
@@ -510,13 +512,13 @@ def test_init_env(self):
510512
}
511513
global_config = {
512514
'Py_DontWriteBytecodeFlag': 1,
515+
'Py_FileSystemDefaultEncodeErrors': self.UTF8_MODE_ERRORS,
516+
'Py_FileSystemDefaultEncoding': 'utf-8',
513517
'Py_InspectFlag': 1,
514518
'Py_NoUserSiteDirectory': 1,
515519
'Py_OptimizeFlag': 2,
516520
'Py_UnbufferedStdioFlag': 1,
517521
'Py_VerboseFlag': 1,
518-
'Py_FileSystemDefaultEncoding': 'utf-8',
519-
'Py_FileSystemDefaultEncodeErrors': self.UTF8_MODE_ERRORS,
520522
}
521523
self.check_config("init_env&quo 3DBA t;, core_config, global_config)
522524

0 commit comments

Comments
 (0)
0