Synch with pyunit CVS:

- Adds Fred's patch 487662: "Better error message for assertEqual"
 - Removed small portion of code unused after Guido's patch
   490119: "Don't treat ^C as error"
This commit is contained in:
Steve Purcell 2001-12-17 10:13:17 +00:00
parent 33c1a8893d
commit ca9aaf36e1
1 changed files with 4 additions and 4 deletions

View File

@ -283,14 +283,16 @@ def failUnlessEqual(self, first, second, msg=None):
operator.
"""
if first != second:
raise self.failureException, (msg or '%s != %s' % (first, second))
raise self.failureException, \
(msg or '%s != %s' % (`first`, `second`))
def failIfEqual(self, first, second, msg=None):
"""Fail if the two objects are equal as determined by the '=='
operator.
"""
if first == second:
raise self.failureException, (msg or '%s == %s' % (first, second))
raise self.failureException, \
(msg or '%s == %s' % (`first`, `second`))
assertEqual = assertEquals = failUnlessEqual
@ -567,8 +569,6 @@ def addError(self, test, err):
self.stream.writeln("ERROR")
elif self.dots:
self.stream.write('E')
if err[0] is KeyboardInterrupt:
self.shouldStop = 1
def addFailure(self, test, err):
TestResult.addFailure(self, test, err)