summaryrefslogtreecommitdiff
path: root/nose
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2014-04-10 09:21:02 -0400
committerJohn Szakmeister <john@szakmeister.net>2014-04-10 09:21:02 -0400
commitdaf2c38eb4c4844af1b7cedcd60fe10547dd13d0 (patch)
treee32491d301bf55a11c1d5dafb9f4e2b0351274cd /nose
parent0181572a64195a8fa1c6c867ae6c61a79a9606ca (diff)
parente49dddb4eb3a3f6fa9d910e1e34bde02eaba5f18 (diff)
downloadnose-daf2c38eb4c4844af1b7cedcd60fe10547dd13d0.tar.gz
Merge pull request #787 from AntoineD/master
Fix #786: generator method fails with callable instance
Diffstat (limited to 'nose')
-rw-r--r--nose/loader.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nose/loader.py b/nose/loader.py
index 4152a12..8a85515 100644
--- a/nose/loader.py
+++ b/nose/loader.py
@@ -287,7 +287,7 @@ class TestLoader(unittest.TestLoader):
test_func = unbound_method(c, getattr(c, test_func))
if ismethod(test_func):
yield MethodTestCase(test_func, arg=arg, descriptor=g)
- elif isfunction(test_func):
+ elif callable(test_func):
# In this case we're forcing the 'MethodTestCase'
# to run the inline function as its test call,
# but using the generator method as the 'method of
@@ -296,7 +296,7 @@ class TestLoader(unittest.TestLoader):
else:
yield Failure(
TypeError,
- "%s is not a function or method" % test_func)
+ "%s is not a callable or method" % test_func)
except KeyboardInterrupt:
raise
except: