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
c0dc65ef
Commit
c0dc65ef
authored
Oct 12, 2014
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change deprecated Exception.message to Exception.args-[0] where the use of
.message is not an essential part of the test.
parent
54edfb3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
Lib/test/string_tests.py
Lib/test/string_tests.py
+1
-1
Lib/test/test_string.py
Lib/test/test_string.py
+1
-1
Lib/test/test_userstring.py
Lib/test/test_userstring.py
+1
-1
No files found.
Lib/test/string_tests.py
View file @
c0dc65ef
...
...
@@ -70,7 +70,7 @@ class CommonTest(unittest.TestCase):
args
=
self
.
fixtype
(
args
)
with
self
.
assertRaises
(
exc
)
as
cm
:
getattr
(
obj
,
methodname
)(
*
args
)
self
.
assertNotEqual
(
cm
.
exception
.
message
,
''
)
self
.
assertNotEqual
(
cm
.
exception
.
args
[
0
]
,
''
)
# call object.method(*args) without any checks
def
checkcall
(
self
,
object
,
methodname
,
*
args
):
...
...
Lib/test/test_string.py
View file @
c0dc65ef
...
...
@@ -19,7 +19,7 @@ class StringTest(
def
checkraises
(
self
,
exc
,
obj
,
methodname
,
*
args
):
with
self
.
assertRaises
(
exc
)
as
cm
:
getattr
(
string
,
methodname
)(
obj
,
*
args
)
self
.
assertNotEqual
(
cm
.
exception
.
message
,
''
)
self
.
assertNotEqual
(
cm
.
exception
.
args
[
0
]
,
''
)
def
checkcall
(
self
,
object
,
methodname
,
*
args
):
getattr
(
string
,
methodname
)(
object
,
*
args
)
...
...
Lib/test/test_userstring.py
View file @
c0dc65ef
...
...
@@ -33,7 +33,7 @@ class UserStringTest(
# we don't fix the arguments, because UserString can't cope with it
with
self
.
assertRaises
(
exc
)
as
cm
:
getattr
(
obj
,
methodname
)(
*
args
)
self
.
assertNotEqual
(
cm
.
exception
.
message
,
''
)
self
.
assertNotEqual
(
cm
.
exception
.
args
[
0
]
,
''
)
def
checkcall
(
self
,
object
,
methodname
,
*
args
):
object
=
self
.
fixtype
(
object
)
...
...
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