summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-01-29 17:55:47 +0000
committerR. David Murray <rdmurray@bitdance.com>2010-01-29 17:55:47 +0000
commit67d1bbde3fba8530c91e468d2cc6dc36083c0933 (patch)
tree16f351b8c3cdf6ab5fd6a57c8d00caffa7b49e31
parentbc09964be115a81e6324dbea5b5fc049759e9430 (diff)
downloadcpython-git-67d1bbde3fba8530c91e468d2cc6dc36083c0933.tar.gz
Merged revisions 77815 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77815 | r.david.murray | 2010-01-28 16:16:33 -0500 (Thu, 28 Jan 2010) | 3 lines Change error report when the object passed to suite.addTest is not callable to include the repr of the invalid object. ........
-rw-r--r--Lib/unittest/suite.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py
index 8672aab3ad..35b7d91da3 100644
--- a/Lib/unittest/suite.py
+++ b/Lib/unittest/suite.py
@@ -40,7 +40,7 @@ class TestSuite(object):
def addTest(self, test):
# sanity checks
if not hasattr(test, '__call__'):
- raise TypeError("the test to add must be callable")
+ raise TypeError("{} is not callable".format(repr(test)))
if isinstance(test, type) and issubclass(test,
(case.TestCase, TestSuite)):
raise TypeError("TestCases and TestSuites must be instantiated "