This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients Alex.Willmer, lemburg, loewis, vstinner, xdegaye
Date 2016-05-13.11:47:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463140058.17.0.0903629570456.issue26920@psf.upfronthosting.co.za>
In-reply-to
Content
> test_ioencoding_nonascii does not fail when LANG is set to en_GB.UTF-8 in the environment.

When LANG is not set, we have on an android emulator:

>>> from test.support import FS_NONASCII
>>> print(FS_NONASCII)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character '\xe6' in position 0: ordinal not in range(128)


But on linux when LANG is not set:

$ LANG= ./python
Python 3.6.0a0 (default:eee959fee5f5+, May 13 2016, 11:32:27) 
[GCC 6.1.1 20160501] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from test.support import FS_NONASCII
>>> print(FS_NONASCII)
None
>>> 

And test_ioencoding_nonascii is skipped accordingly on linux for the following printed reason: 'requires OS support of non-ASCII encodings'.

On Android, os.fsdecode(os.fsencode('\xe6')) does not raise UnicodeError in the test.support module. And locale.getpreferredencoding() returns 'ascii'. So it seems that this criterion (FS_NONASCII is not None) is not sufficient to decide when this test should be run and not skipped.
History
Date User Action Args
2016-05-13 11:47:38xdegayesetrecipients: + xdegaye, lemburg, loewis, vstinner, Alex.Willmer
2016-05-13 11:47:38xdegayesetmessageid: <1463140058.17.0.0903629570456.issue26920@psf.upfronthosting.co.za>
2016-05-13 11:47:38xdegayelinkissue26920 messages
2016-05-13 11:47:37xdegayecreate