summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Purcell <steve@pythonconsulting.com>2001-12-17 10:13:17 (GMT)
committerSteve Purcell <steve@pythonconsulting.com>2001-12-17 10:13:17 (GMT)
commitca9aaf36e19598abb1969d43d3ede8b42c13195b (patch)
tree61bcabc6223e7a6d02136ec1870b7147bf4bbd32
parent33c1a8893de95564c8604c259390a3eabf274a0b (diff)
downloadcpython-ca9aaf36e19598abb1969d43d3ede8b42c13195b.zip
cpython-ca9aaf36e19598abb1969d43d3ede8b42c13195b.tar.gz
cpython-ca9aaf36e19598abb1969d43d3ede8b42c13195b.tar.bz2
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"
-rw-r--r--Lib/unittest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py
index 3f59916..1538a5d 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -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)