summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-05 06:09:13 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-05 06:09:13 (GMT)
commiteeab7da5914f67a54223e17d370318c5cb6b83ba (patch)
treebbf61a9e5ee41c2e807ef7f085efa76287438726
parent40c6b47ca1e69f5b91b8ce3bd271865cb5a7d443 (diff)
downloadcpython-eeab7da5914f67a54223e17d370318c5cb6b83ba.zip
cpython-eeab7da5914f67a54223e17d370318c5cb6b83ba.tar.gz
cpython-eeab7da5914f67a54223e17d370318c5cb6b83ba.tar.bz2
Skip test_curses if stdin is not a tty (like when run from cron or buildbot). Will backport.
-rw-r--r--Lib/test/test_curses.py4
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"