diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-05 06:10:16 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-05 06:10:16 (GMT) |
commit | 586ad5584102909c5bf5a37a73cfb25d6f04d54e (patch) | |
tree | 2a0c26db0d3c6ff328f79cecc7a935fa4122e6d9 /Lib | |
parent | 4e90d912e5d7bf1401d9e6cd6f1c62783a4051bc (diff) | |
download | cpython-586ad5584102909c5bf5a37a73cfb25d6f04d54e.zip cpython-586ad5584102909c5bf5a37a73cfb25d6f04d54e.tar.gz cpython-586ad5584102909c5bf5a37a73cfb25d6f04d54e.tar.bz2 |
Backport: Skip test_curses if stdin is not a tty (like when run from cron or buildbot).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_curses.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 67f3c57..7481642 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -8,7 +8,7 @@ # getmouse(), ungetmouse(), init_color() # -import curses, sys, tempfile +import curses, sys, tempfile, os # Optionally test curses module. This currently requires that the # 'curses' resource be given on the regrtest command line using the -u @@ -16,6 +16,8 @@ import curses, sys, tempfile from test import test_support test_support.requires('curses') +if not os.isatty(sys.stdin.fileno()): + raise test_support.TestSkipped, "stdin is not a tty" def window_funcs(stdscr): "Test the methods of windows" |