[issue28997] test_readline.test_nonascii fails on Android

Xavier de Gaye report at bugs.python.org
Tue Dec 20 14:36:42 EST 2016


Xavier de Gaye added the comment:

The test is ok on Android when LANG=en_US.UTF-8.
When LANG is not set, the check made by the first statement in test_nonascii() should skip the test but fails to skip it on Android as Py_EncodeLocale() always encode to utf8 whatever the locale (same as with darwin).
This patch adds a second check to verify that readline does handle multi bytes characters and does skip the test if not. So on Android the test is skipped now when LANG is not set.  Another solution would have been to set LANG=en_US.UTF-8 in the environment of the process forked by run_pty(), but it does not sound robust as there may be other setups where readline does not handle multi bytes characters.

----------
Added file: http://bugs.python.org/file45976/readline_multibyte.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28997>
_______________________________________


More information about the Python-bugs-list mailing list