mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
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:
parent
040c17fe38
commit
b9fa0a843e
10 changed files with 20 additions and 19 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue