diff options
author | Georg Brandl <georg@python.org> | 2006-01-12 15:41:05 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-01-12 15:41:05 (GMT) |
commit | 05f5ba9636cb0c8692e186553ce18fb5ab77b744 (patch) | |
tree | fa0a8e1687aaabeb1b0e15996662c7f299caf8dc /Lib/test/test_curses.py | |
parent | 3b4fff8079834433ba75ee0873c538410cd082c9 (diff) | |
download | cpython-05f5ba9636cb0c8692e186553ce18fb5ab77b744.zip cpython-05f5ba9636cb0c8692e186553ce18fb5ab77b744.tar.gz cpython-05f5ba9636cb0c8692e186553ce18fb5ab77b744.tar.bz2 |
Test curses.setupterm() before initscr().
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r-- | Lib/test/test_curses.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 419d8fc..a4a45a7 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -173,7 +173,6 @@ def module_funcs(stdscr): curses.qiflush() curses.raw() ; curses.raw(1) curses.setsyx(5,5) - curses.setupterm(fd=sys.__stdout__.fileno()) curses.tigetflag('hc') curses.tigetnum('co') curses.tigetstr('cr') @@ -239,12 +238,14 @@ def main(stdscr): finally: curses.resetty() - if __name__ == '__main__': curses.wrapper(main) unit_tests() else: try: + # testing setupterm() inside initscr/endwin + # causes terminal breakage + curses.setupterm(fd=sys.__stdout__.fileno()) stdscr = curses.initscr() main(stdscr) finally: |