summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>2007-04-11 18:14:04 +0200
committerAdrien Di Mascio <Adrien.DiMascio@logilab.fr>2007-04-11 18:14:04 +0200
commit6fb3676b62fec3192475ff3ead6f6069e7579378 (patch)
tree96c3037329bbe044d3647a61e42fdab6366a7534
parent8f303842aba31e8ba4419e975e237080d44b8fe0 (diff)
downloadlogilab-common-6fb3676b62fec3192475ff3ead6f6069e7579378.tar.gz
make everyone happy
-rw-r--r--testlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/testlib.py b/testlib.py
index 92766e8..62912a8 100644
--- a/testlib.py
+++ b/testlib.py
@@ -608,7 +608,7 @@ Examples:
self.capture += 1
if len(args) == 0 and self.defaultTest is None:
suitefunc = getattr(self.module, 'suite', None)
- if hasattr(suitefunc, 'im_func'):
+ if isinstance(suitefunc, (types.FunctionType, types.MethodType)):
self.test = self.module.suite()
else:
self.test = self.testLoader.loadTestsFromModule(self.module)