[Python-checkins] cpython: Issue #12567: Fix curses.unget_wch() tests
victor.stinner
python-checkins at python.org
Tue Sep 6 10:08:40 CEST 2011
http://hg.python.org/cpython/rev/786668a4fb6b
changeset: 72301:786668a4fb6b
user: Victor Stinner <vstinner at wyplay.com>
date: Tue Sep 06 10:08:28 2011 +0200
summary:
Issue #12567: Fix curses.unget_wch() tests
Skip the test if the function is missing. Use U+0061 (a) instead of U+00E9 (é)
because U+00E9 raises a _curses.error('unget_wch() returned ERR') on some
buildbots. It's maybe because of the locale encoding.
files:
Lib/test/test_curses.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -265,14 +265,16 @@
stdscr.getkey()
def test_unget_wch(stdscr):
- ch = '\xe9'
+ if not hasattr(curses, 'unget_wch'):
+ return
+ ch = 'a'
curses.unget_wch(ch)
read = stdscr.get_wch()
read = chr(read)
if read != ch:
raise AssertionError("%r != %r" % (read, ch))
- ch = ord('\xe9')
+ ch = ord('a')
curses.unget_wch(ch)
read = stdscr.get_wch()
if read != ch:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list