Message265465
> 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. |
|
Date |
User |
Action |
Args |
2016-05-13 11:47:38 | xdegaye | set | recipients:
+ xdegaye, lemburg, loewis, vstinner, Alex.Willmer |
2016-05-13 11:47:38 | xdegaye | set | messageid: <1463140058.17.0.0903629570456.issue26920@psf.upfronthosting.co.za> |
2016-05-13 11:47:38 | xdegaye | link | issue26920 messages |
2016-05-13 11:47:37 | xdegaye | create | |
|