[Python-checkins] r61063 - python/trunk/Lib/test/test_curses.py

andrew.kuchling python-checkins at python.org
Mon Feb 25 17:29:19 CET 2008


Author: andrew.kuchling
Date: Mon Feb 25 17:29:19 2008
New Revision: 61063

Modified:
   python/trunk/Lib/test/test_curses.py
Log:
Move .setupterm() output so that we don't try to call endwin() if it fails

Modified: python/trunk/Lib/test/test_curses.py
==============================================================================
--- python/trunk/Lib/test/test_curses.py	(original)
+++ python/trunk/Lib/test/test_curses.py	Mon Feb 25 17:29:19 2008
@@ -269,13 +269,12 @@
     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()


More information about the Python-checkins mailing list