]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #12669: Fix test_curses so that it can run on the buildbots.
authorNadeem Vawda <nadeem.vawda@gmail.com>
Sat, 13 Aug 2011 13:43:49 +0000 (15:43 +0200)
committerNadeem Vawda <nadeem.vawda@gmail.com>
Sat, 13 Aug 2011 13:43:49 +0000 (15:43 +0200)
Lib/test/test_curses.py

index b9ff34644b6b2cfb191f290c07d4c7b6d4d055d2..c767e9388f62f509b99cc68f9fa745e0ce308cdd 100644 (file)
@@ -276,11 +276,11 @@ def main(stdscr):
         curses.resetty()
 
 def test_main():
-    if not sys.stdout.isatty():
-        raise unittest.SkipTest("sys.stdout is not a tty")
+    if not sys.__stdout__.isatty():
+        raise unittest.SkipTest("sys.__stdout__ is not a tty")
     # testing setupterm() inside initscr/endwin
     # causes terminal breakage
-    curses.setupterm(fd=sys.stdout.fileno())
+    curses.setupterm(fd=sys.__stdout__.fileno())
     try:
         stdscr = curses.initscr()
         main(stdscr)