]> granicus.if.org Git - python/commitdiff
This is more-or-less:
authorMichael W. Hudson <mwh@python.net>
Sat, 7 Aug 2004 15:27:16 +0000 (15:27 +0000)
committerMichael W. Hudson <mwh@python.net>
Sat, 7 Aug 2004 15:27:16 +0000 (15:27 +0000)
1005123 ] test_curses fails on MacOS X 10.3

Be a bit more guarded about what we expect a terminal to be capable
of.

Lib/test/test_curses.py

index 2065ef24a1a728c45816d1d7355d4b5bff6700d8..fa57e293521ef4cd9f29c24a2d56fc13bf3eb2b2 100644 (file)
@@ -140,7 +140,8 @@ def module_funcs(stdscr):
         func()
 
     # Functions that actually need arguments
-    curses.curs_set(1)
+    if curses.tigetstr("cnorm"):
+        curses.curs_set(1)
     curses.delay_output(1)
     curses.echo() ; curses.echo(1)
 
@@ -181,8 +182,8 @@ def module_funcs(stdscr):
         curses.pair_content(curses.COLOR_PAIRS)
         curses.pair_number(0)
 
-    if hasattr(curses, 'use_default_colors'):
-        curses.use_default_colors()
+        if hasattr(curses, 'use_default_colors'):
+            curses.use_default_colors()
 
     if hasattr(curses, 'keyname'):
         curses.keyname(13)