New submission from Ivan Pozdeev <ivan_pozd...@mail.ru>:

This causes test_ntpath and test_posixpath to fail in subj.

Sample failure:

======================================================================
FAIL: test_expandvars_nonascii (__main__.NtCommonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Users\Sasha\Documents\cpython\lib\test\test_genericpath.py", line 230
, in test_expandvars_nonascii
    check(u'$spam bar', u'%s bar' % unonascii)
  File "c:\Users\Sasha\Documents\cpython\lib\test\test_genericpath.py", line 214
, in check
    self.assertEqual(expandvars(value), expected)
AssertionError: u'? bar' != u'\xe6 bar'
- ? bar
? ^
+ \xe6 bar
? ^


Cause:

if sys.getfilesystemencoding()=='mbcs', encoding Unicode characters that are 
missing in the current locale succeeds but produces '?'.

So, test.support.FS_NONASCII's test fails to detect if a character is present 
in the current locale.

----------
components: Tests
messages: 318271
nosy: Ivan.Pozdeev
priority: normal
severity: normal
status: open
title: test.support.FS_NONASCII returns incorrect result in Windows with non-US 
locale
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33709>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to