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

@ -6,7 +6,7 @@
"""
import binhex
import tempfile
from test_support import verbose
from test_support import verbose, TestSkipped
def test():
@ -15,7 +15,7 @@ def test():
fname2 = tempfile.mktemp()
f = open(fname1, 'w')
except:
raise ImportError, "Cannot test binhex without a temp file"
raise TestSkipped, "Cannot test binhex without a temp file"
start = 'Jack is my hero'
f.write(start)