mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Change more tests to use import_module for the modules that
should cause tests to be skipped. Also rename import_function to the more descriptive get_attribute and add a docstring.
This commit is contained in:
parent
dc340eedaa
commit
3db8a3432b
17 changed files with 53 additions and 43 deletions
|
@ -9,15 +9,16 @@
|
|||
# Only called, not tested: getmouse(), ungetmouse()
|
||||
#
|
||||
|
||||
import curses, sys, tempfile, os
|
||||
import curses.panel
|
||||
import sys, tempfile, os
|
||||
|
||||
# Optionally test curses module. This currently requires that the
|
||||
# 'curses' resource be given on the regrtest command line using the -u
|
||||
# option. If not available, nothing after this line will be executed.
|
||||
|
||||
from test.test_support import requires
|
||||
from test.test_support import requires, import_module
|
||||
requires('curses')
|
||||
curses = import_module('curses')
|
||||
curses.panel = import_module('curses.panel')
|
||||
|
||||
# XXX: if newterm was supported we could use it instead of initscr and not exit
|
||||
term = os.environ.get('TERM')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue