mirror of https://github.com/python/cpython
bpo-46659: test.support avoids locale.getdefaultlocale() (GH-31167)
skip_if_buggy_ucrt_strfptime() of test.support now uses locale.getpreferredencoding(False) instead of locale.getdefaultlocale() to get the Windows code page.
This commit is contained in:
parent
04dd60e50c
commit
06b8f1615b
|
@ -1421,7 +1421,7 @@ def skip_if_buggy_ucrt_strfptime(test):
|
|||
global _buggy_ucrt
|
||||
if _buggy_ucrt is None:
|
||||
if(sys.platform == 'win32' and
|
||||
locale.getdefaultlocale()[1] == 'cp65001' and
|
||||
locale.getpreferredencoding(False) == 'cp65001' and
|
||||
time.localtime().tm_zone == ''):
|
||||
_buggy_ucrt = True
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue