[Python-checkins] r42020 - python/branches/release24-maint/Lib/test/test_curses.py

georg.brandl python-checkins at python.org
Thu Jan 12 16:41:15 CET 2006


Author: georg.brandl
Date: Thu Jan 12 16:41:15 2006
New Revision: 42020

Modified:
   python/branches/release24-maint/Lib/test/test_curses.py
Log:
Test curses.setupterm() before initscr().


Modified: python/branches/release24-maint/Lib/test/test_curses.py
==============================================================================
--- python/branches/release24-maint/Lib/test/test_curses.py	(original)
+++ python/branches/release24-maint/Lib/test/test_curses.py	Thu Jan 12 16:41:15 2006
@@ -173,7 +173,6 @@
     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 @@
     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:


More information about the Python-checkins mailing list