summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_curses.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@wyplay.com>2011-09-06 08:08:28 (GMT)
committerVictor Stinner <vstinner@wyplay.com>2011-09-06 08:08:28 (GMT)
commit900c292c6b886ad9c693d7e0481dc16398d5071d (patch)
tree8044d20e9f18cdce17e98d97332fd36c41a035d0 /Lib/test/test_curses.py
parent5c9a8d09089dfd2ea44713edfd08b50fb80d7704 (diff)
downloadcpython-900c292c6b886ad9c693d7e0481dc16398d5071d.zip
cpython-900c292c6b886ad9c693d7e0481dc16398d5071d.tar.gz
cpython-900c292c6b886ad9c693d7e0481dc16398d5071d.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r--Lib/test/test_curses.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index 8caf0de..b4673e9 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -265,14 +265,16 @@ def test_issue6243(stdscr):
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: