mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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,5 +1,5 @@
|
|||
import pty, os, sys, string
|
||||
from test_support import verbose, TestFailed
|
||||
from test_support import verbose, TestFailed, TestSkipped
|
||||
|
||||
TEST_STRING_1 = "I wish to buy a fish license."
|
||||
TEST_STRING_2 = "For my pet fish, Eric."
|
||||
|
@ -25,7 +25,7 @@ try:
|
|||
debug("Got slave_fd '%d'"%slave_fd)
|
||||
except OSError:
|
||||
# " An optional feature could not be imported " ... ?
|
||||
raise ImportError, "Pseudo-terminals (seemingly) not functional."
|
||||
raise TestSkipped, "Pseudo-terminals (seemingly) not functional."
|
||||
|
||||
if not os.isatty(master_fd):
|
||||
raise TestFailed, "master_fd is not a tty"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue