SF bug #715145: unittest.py still uses != in failUnlessEqual

This commit is contained in:
Raymond Hettinger 2003-04-04 22:56:42 +00:00
parent dee38ac7dd
commit c377cbfdaf
2 changed files with 6 additions and 2 deletions

View File

@ -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`))

View File

@ -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.