From: R. David Murray Date: Mon, 19 Oct 2009 16:01:28 +0000 (+0000) Subject: Only run test_curses when sys.__stdout__ is a tty. This eliminates the X-Git-Tag: v2.7a1~305 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9f1944fc30510e8c4f8c159602d202a5f2293f6;p=thirdparty%2FPython%2Fcpython.git Only run test_curses when sys.__stdout__ is a tty. This eliminates the last false positive when running regrtest with -j. --- diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 2f7c04c3c78f..414228211a14 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -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())