From ca9aaf36e19598abb1969d43d3ede8b42c13195b Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Mon, 17 Dec 2001 10:13:17 +0000 Subject: [PATCH] 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" --- Lib/unittest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/unittest.py b/Lib/unittest.py index 3f59916760d..1538a5d4b76 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -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)