diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index d1b80f88dc2..61f9ca81fc6 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -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())