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
c377cbfd
Commit
c377cbfd
authored
Apr 04, 2003
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF bug #715145: unittest.py still uses != in failUnlessEqual
parent
dee38ac7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Lib/unittest.py
Lib/unittest.py
+2
-2
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/unittest.py
View file @
c377cbfd
...
...
@@ -285,10 +285,10 @@ class TestCase:
raise
self
.
failureException
,
excName
def
failUnlessEqual
(
self
,
first
,
second
,
msg
=
None
):
"""Fail if the two objects are unequal as determined by the '
!
='
"""Fail if the two objects are unequal as determined by the '
=
='
operator.
"""
if
first
!
=
second
:
if
not
first
=
=
second
:
raise
self
.
failureException
,
\
(
msg
or
'%s != %s'
%
(
`first`
,
`second`
))
...
...
Misc/NEWS
View file @
c377cbfd
...
...
@@ -73,6 +73,10 @@ Extension modules
Library
-------
- unittest.failUnlessEqual and its equivalent unittest.assertEqual now
return '
not
a
==
b
' rather than '
a
!= b'. This gives the desired
result
for
classes
that
define
__eq__
without
defining
__ne__
.
-
sgmllib
now
supports
SGML
marked
sections
,
in
particular
the
MS
Office
extensions
.
...
...
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