Raise 'TestSkipped' (from the test_support) module rather than 'ImportError'

to signify a test that should be marked as 'skipped' rather than 'failed'.
Also 'document' it, in README.
This commit is contained in:
Thomas Wouters 2000-08-04 13:34:43 +00:00
parent 040c17fe38
commit b9fa0a843e
10 changed files with 20 additions and 19 deletions

View file

@ -3,7 +3,7 @@
taken mostly from the documentation.
Roger E. Masse
"""
from test_support import verbose
from test_support import verbose, TestSkipped
import gl, GL, time
glattrs = ['RGBcolor', 'RGBcursor', 'RGBmode', 'RGBrange', 'RGBwritemask',
@ -87,8 +87,7 @@ def main():
try:
display = os.environ['DISPLAY']
except:
# Raise ImportError because regrtest.py handles it specially.
raise ImportError, "No $DISPLAY -- skipping gl test"
raise TestSkipped, "No $DISPLAY -- skipping gl test"
# touch all the attributes of gl without doing anything
if verbose: