aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/suite.py')
-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 38bd6b861df..cde5d385ed1 100644
--- a/Lib/unittest/suite.py
+++ b/Lib/unittest/suite.py
@@ -42,7 +42,7 @@ class BaseTestSuite(object):
def addTest(self, test):
# sanity checks
- if not hasattr(test, '__call__'):
+ if not callable(test):
raise TypeError("{} is not callable".format(repr(test)))
if isinstance(test, type) and issubclass(test,
(case.TestCase, TestSuite)):