]> granicus.if.org Git - python/commitdiff
It turns out test_curses can fail in a 2.6 buildbot because stdout is not
authorR. David Murray <rdmurray@bitdance.com>
Tue, 3 Nov 2009 14:31:53 +0000 (14:31 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Tue, 3 Nov 2009 14:31:53 +0000 (14:31 +0000)
a tty in certain cases.

Merged revisions 75518 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75518 | r.david.murray | 2009-10-19 12:01:28 -0400 (Mon, 19 Oct 2009) | 3 lines

  Only run test_curses when sys.__stdout__ is a tty.  This eliminates the
  last false positive when running regrtest with -j.
........

Lib/test/test_curses.py

index d1b80f88dc2ceff6c4dbd542a00301982c221e16..61f9ca81fc6aaadf74d475af502a219c29de63ba 100644 (file)
@@ -269,6 +269,8 @@ if __name__ == '__main__':
     curses.wrapper(main)
     unit_tests()
 else:
+    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())