mirror of
https://github.com/python/cpython.git
synced 2025-09-09 02:11:51 +00:00
Skip test_curses if stdin is not a tty (like when run from cron or buildbot). Will backport.
This commit is contained in:
parent
40c6b47ca1
commit
eeab7da591
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
||||||
# getmouse(), ungetmouse(), init_color()
|
# getmouse(), ungetmouse(), init_color()
|
||||||
#
|
#
|
||||||
|
|
||||||
import curses, sys, tempfile
|
import curses, sys, tempfile, os
|
||||||
|
|
||||||
# Optionally test curses module. This currently requires that the
|
# Optionally test curses module. This currently requires that the
|
||||||
# 'curses' resource be given on the regrtest command line using the -u
|
# '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
|
from test import test_support
|
||||||
test_support.requires('curses')
|
test_support.requires('curses')
|
||||||
|
if not os.isatty(sys.stdin.fileno()):
|
||||||
|
raise test_support.TestSkipped, "stdin is not a tty"
|
||||||
|
|
||||||
def window_funcs(stdscr):
|
def window_funcs(stdscr):
|
||||||
"Test the methods of windows"
|
"Test the methods of windows"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue