]> granicus.if.org Git - python/commitdiff
Only run test_curses when sys.__stdout__ is a tty. This eliminates the
authorR. David Murray <rdmurray@bitdance.com>
Mon, 19 Oct 2009 16:01:28 +0000 (16:01 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Mon, 19 Oct 2009 16:01:28 +0000 (16:01 +0000)
last false positive when running regrtest with -j.

Lib/test/test_curses.py

index 2f7c04c3c78f7760a3e9e432df449b2a5af7d2e6..414228211a14e9908dcc5555ff58516010db9648 100644 (file)
@@ -276,6 +276,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())