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
361467e5
Commit
361467e5
authored
Apr 03, 2011
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#11282: the fail* methods will stay around a few more versions.
parent
9481e417
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
Doc/library/unittest.rst
Doc/library/unittest.rst
+1
-1
Lib/unittest/case.py
Lib/unittest/case.py
+1
-2
Lib/unittest/test/test_case.py
Lib/unittest/test/test_case.py
+2
-4
No files found.
Doc/library/unittest.rst
View file @
361467e5
...
...
@@ -1459,7 +1459,7 @@ along with their deprecated aliases:
:meth:`.assertRaisesRegex` assertRaisesRegexp
============================== ====================== ======================
.. deprecated
-removed:: 3.1 3.3
.. deprecated
:: 3.1
the fail* aliases listed in the second column.
.. deprecated:: 3.2
the assert* aliases listed in the third column.
...
...
Lib/unittest/case.py
View file @
361467e5
...
...
@@ -1181,8 +1181,7 @@ class TestCase(object):
return
original_func
(
*
args
,
**
kwargs
)
return
deprecated_func
# The fail* methods can be removed in 3.3, the 5 assert* methods will
# have to stay around for a few more versions. See #9424.
# see #9424
failUnlessEqual
=
assertEquals
=
_deprecate
(
assertEqual
)
failIfEqual
=
assertNotEquals
=
_deprecate
(
assertNotEqual
)
failUnlessAlmostEqual
=
assertAlmostEquals
=
_deprecate
(
assertAlmostEqual
)
...
...
Lib/unittest/test/test_case.py
View file @
361467e5
...
...
@@ -1088,10 +1088,8 @@ test case
_runtime_warn
(
"barz"
)
def
testDeprecatedMethodNames
(
self
):
"""Test that the deprecated methods raise a DeprecationWarning.
The fail* methods will be removed in 3.3. The assert* methods will
have to stay around for a few more versions. See #9424.
"""
Test that the deprecated methods raise a DeprecationWarning. See #9424.
"""
old
=
(
(
self
.
failIfEqual
,
(
3
,
5
)),
...
...
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