]> granicus.if.org Git - python/commitdiff
Note that on py3k we are actually looking at sys.stdout, not sys.__stdout__.
authorR. David Murray <rdmurray@bitdance.com>
Mon, 19 Oct 2009 16:04:44 +0000 (16:04 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Mon, 19 Oct 2009 16:04:44 +0000 (16:04 +0000)
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 2615ffb1cbd4372ccc9b61785c206ababe7607a9..9273ba8311ac90414a545d6c27399db79ae7385e 100644 (file)
@@ -275,6 +275,8 @@ def main(stdscr):
         curses.resetty()
 
 def test_main():
+    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())