[issue11390] doctest: add cmdline parameters
STINNER Victor
report at bugs.python.org
Tue Jun 25 01:59:36 CEST 2013
STINNER Victor added the comment:
The new tests added in changeset ae802dc4dcd4 are failing on some buildbots. I can reproduce the issue on my Linux box (Fedora 18). First failure of "./python -m test test_doctest":
[1/1] test_doctest
**********************************************************************
File "/home/haypo/prog/python/default/Lib/test/test_doctest.py", line 2627, in test.test_doctest.test_CLI
Failed example:
rc1, out1, err1
Expected:
(0, b'', b'')
Got:
(0, b'\x1b[?1034h', b'')
The b'\x1b[?1034h' sequence it written by the readline module when it is imported. The readline module is imported by pdb, which is used by doctest.
The following article proposes set to TERM environment variable to "linux" to workaround the issue:
http://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
It works:
$ echo $TERM # yeah, Fedora supports 256 colors!
xterm-256color
$ ./python -c 'import readline'|hexdump -C
00000000 1b 5b 3f 31 30 33 34 68 |.[?1034h|
00000008
$ TERM=linux ./python -c 'import readline'|hexdump -C
This issue was reported to OpenSuse in 2009:
http://lists.opensuse.org/opensuse-bugs/2009-05/msg01633.html
The issue is not specific to Python. Just one another example with Octave (issue closed as "not a bug"):
https://bugzilla.redhat.com/show_bug.cgi?id=304181
The issue was also reported upstream (bug-readline mailing list) a few days ago:
http://lists.gnu.org/archive/html/bug-readline/2013-06/msg00000.html
----------
nosy: +haypo
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11390>
_______________________________________
More information about the Python-bugs-list
mailing list