diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-02-25 16:29:19 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-02-25 16:29:19 (GMT) |
commit | aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d (patch) | |
tree | efd13b1417d3860c69639ad01d05e118b14d6d8d /Lib/test | |
parent | c6b5200931ee1d1029f8d24a79c3f48b40358771 (diff) | |
download | cpython-aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d.zip cpython-aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d.tar.gz cpython-aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d.tar.bz2 |
Move .setupterm() output so that we don't try to call endwin() if it fails
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_curses.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index b236f35..d1b80f8 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -269,13 +269,12 @@ if __name__ == '__main__': curses.wrapper(main) unit_tests() else: + # testing setupterm() inside initscr/endwin + # causes terminal breakage + curses.setupterm(fd=sys.__stdout__.fileno()) try: - # testing setupterm() inside initscr/endwin - # causes terminal breakage - curses.setupterm(fd=sys.__stdout__.fileno()) stdscr = curses.initscr() main(stdscr) finally: curses.endwin() - unit_tests() |