Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
983874dd
Commit
983874dd
authored
Jan 19, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use constructor form of "raise"; normalize <wink> docstrings.
parent
d93c0b6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
Lib/test/test_support.py
Lib/test/test_support.py
+5
-9
No files found.
Lib/test/test_support.py
View file @
983874dd
...
...
@@ -15,10 +15,8 @@ class TestSkipped(Error):
example, if some resource can't be used, such as the network
appears to be unavailable, this should be raised instead of
TestFailed.
"""
verbose
=
1
# Flag set to 0 by regrtest.py
use_large_resources
=
1
# Flag set to 0 by regrtest.py
...
...
@@ -73,13 +71,11 @@ def findfile(file, here=__file__):
return
file
def
verify
(
condition
,
reason
=
'test failed'
):
"""Verify that condition is true. If not, raise an AssertionError.
""" Verify that condition is true. If not, raise an
AssertionError.
The optinal argument reason can be given to provide
a better error text.
The optinal argument reason can be given to provide
a better error text.
"""
if
not
condition
:
raise
AssertionError
,
reason
raise
AssertionError
(
reason
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment