mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -1,7 +1,7 @@
|
|||
# Test to see if openpty works. (But don't worry if it isn't available.)
|
||||
|
||||
import os
|
||||
from test_support import verbose, TestFailed
|
||||
from test_support import verbose, TestFailed, TestSkipped
|
||||
|
||||
try:
|
||||
if verbose:
|
||||
|
@ -10,7 +10,7 @@ try:
|
|||
if verbose:
|
||||
print "(master, slave) = (%d, %d)"%(master, slave)
|
||||
except AttributeError:
|
||||
raise ImportError, "No openpty() available."
|
||||
raise TestSkipped, "No openpty() available."
|
||||
|
||||
if not os.isatty(master):
|
||||
raise TestFailed, "Master-end of pty is not a terminal."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue