Only run test_curses when sys.__stdout__ is a tty. This eliminates the

last false positive when running regrtest with -j.
This commit is contained in:
R. David Murray 2009-10-19 16:01:28 +00:00
parent c12781abcb
commit d9f1944fc3
1 changed files with 2 additions and 0 deletions

View 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())