summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_curses.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-02 22:45:29 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-02 22:45:29 (GMT)
commit2662133a05d789de67aeaaad24aa86f49da95844 (patch)
tree221dc1dc36368f0e9fea53bb7fbe7c9abb5e3516 /Lib/test/test_curses.py
parentf7ed9fc063cc4c11cfdf36b6c5023b984ed36b26 (diff)
downloadcpython-2662133a05d789de67aeaaad24aa86f49da95844.zip
cpython-2662133a05d789de67aeaaad24aa86f49da95844.tar.gz
cpython-2662133a05d789de67aeaaad24aa86f49da95844.tar.bz2
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.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index b9ff346..0980783 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')
@@ -264,6 +264,10 @@ def test_issue6243(stdscr):
curses.ungetch(1025)
stdscr.getkey()
+def test_issue10570():
+ b = curses.tparm(curses.tigetstr("cup"), 5, 3)
+ assert type(b) is bytes
+
def main(stdscr):
curses.savetty()
try:
@@ -272,6 +276,7 @@ def main(stdscr):
test_userptr_without_set(stdscr)
test_resize_term(stdscr)
test_issue6243(stdscr)
+ test_issue10570()
finally:
curses.resetty()