Author Ivan.Pozdeev
Recipients Ivan.Pozdeev
Date 2018-05-31.08:54:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-05-31 08:54:10Ivan.Pozdeevsetrecipients: + Ivan.Pozdeev
2018-05-31 08:54:10Ivan.Pozdeevsetmessageid: <1527756850.06.0.682650639539.issue33709@psf.upfronthosting.co.za>
2018-05-31 08:54:10Ivan.Pozdeevlinkissue33709 messages
2018-05-31 08:54:09Ivan.Pozdeevcreate