diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-02-25 16:29:19 +0000 |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-02-25 16:29:19 +0000 |
commit | aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d (patch) | |
tree | efd13b1417d3860c69639ad01d05e118b14d6d8d /Lib/test/test_curses.py | |
parent | c6b5200931ee1d1029f8d24a79c3f48b40358771 (diff) | |
download | cpython-git-aa5e3cea7aeabd4d1c2ad61a60b538c0f842799d.tar.gz |
Move .setupterm() output so that we don't try to call endwin() if it fails
Diffstat (limited to 'Lib/test/test_curses.py')
-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 b236f35b18..d1b80f88dc 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() |