Commit ca9aaf36 authored by Steve Purcell's avatar Steve Purcell

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"
parent 33c1a889
...@@ -283,14 +283,16 @@ class TestCase: ...@@ -283,14 +283,16 @@ class TestCase:
operator. operator.
""" """
if first != second: 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): def failIfEqual(self, first, second, msg=None):
"""Fail if the two objects are equal as determined by the '==' """Fail if the two objects are equal as determined by the '=='
operator. operator.
""" """
if first == second: if first == second:
raise self.failureException, (msg or '%s == %s' % (first, second)) raise self.failureException, \
(msg or '%s == %s' % (`first`, `second`))
assertEqual = assertEquals = failUnlessEqual assertEqual = assertEquals = failUnlessEqual
...@@ -567,8 +569,6 @@ class _TextTestResult(TestResult): ...@@ -567,8 +569,6 @@ class _TextTestResult(TestResult):
self.stream.writeln("ERROR") self.stream.writeln("ERROR")
elif self.dots: elif self.dots:
self.stream.write('E') self.stream.write('E')
if err[0] is KeyboardInterrupt:
self.shouldStop = 1
def addFailure(self, test, err): def addFailure(self, test, err):
TestResult.addFailure(self, test, err) TestResult.addFailure(self, test, err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment