]> granicus.if.org Git - python/commitdiff
Synch with pyunit CVS:
authorSteve Purcell <steve@pythonconsulting.com>
Mon, 17 Dec 2001 10:13:17 +0000 (10:13 +0000)
committerSteve Purcell <steve@pythonconsulting.com>
Mon, 17 Dec 2001 10:13:17 +0000 (10:13 +0000)
 - 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

index 3f59916760da3e23b9a2f152c3869d419f07e3fc..1538a5d4b76131b6015795c1793b964d337e151f 100644 (file)
@@ -283,14 +283,16 @@ class TestCase:
            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 @@ class _TextTestResult(TestResult):
             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)