diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-02 22:47:58 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-02 22:47:58 (GMT) |
commit | df5bccc8a3adfe79e93bbc62bc24b3a95d57b3ac (patch) | |
tree | cd0889e89ba7fe709def04a3b8e5a66879a310dd /Lib/test/test_curses.py | |
parent | 2787ea41fd11b8e0a0514e13b61af8e12764a8f6 (diff) | |
parent | 2662133a05d789de67aeaaad24aa86f49da95844 (diff) | |
download | cpython-df5bccc8a3adfe79e93bbc62bc24b3a95d57b3ac.zip cpython-df5bccc8a3adfe79e93bbc62bc24b3a95d57b3ac.tar.gz cpython-df5bccc8a3adfe79e93bbc62bc24b3a95d57b3ac.tar.bz2 |
(Merge 3.2) Issue #10570: curses.tigetstr() is now expecting a byte string,
instead of a Unicode string.
This is an incompatible change, but the previous behaviour was completly wrong.
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r-- | Lib/test/test_curses.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index b4673e9..ccbbc23 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -190,7 +190,7 @@ def module_funcs(stdscr): curses.tigetflag('hc') curses.tigetnum('co') curses.tigetstr('cr') - curses.tparm('cr') + curses.tparm(b'cr') curses.typeahead(sys.__stdin__.fileno()) curses.unctrl('a') curses.ungetch('a') @@ -280,6 +280,10 @@ def test_unget_wch(stdscr): if read != ch: raise AssertionError("%r != %r" % (read, ch)) +def test_issue10570(): + b = curses.tparm(curses.tigetstr("cup"), 5, 3) + assert type(b) is bytes + def main(stdscr): curses.savetty() try: @@ -289,6 +293,7 @@ def main(stdscr): test_resize_term(stdscr) test_issue6243(stdscr) test_unget_wch(stdscr) + test_issue10570() finally: curses.resetty() |