diff options
author | Antoine Dechaume <boolegue@gmail.com> | 2014-03-18 15:06:41 +0100 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2014-04-10 09:20:10 -0400 |
commit | e49dddb4eb3a3f6fa9d910e1e34bde02eaba5f18 (patch) | |
tree | ff95cd68da24591204edad7aa474822567d00e0b /nose | |
parent | 4a610dadb26c3c2f5ca7946fe5645faf5d9f070f (diff) | |
download | nose-e49dddb4eb3a3f6fa9d910e1e34bde02eaba5f18.tar.gz |
Fix #786: generator method fails with callable instance
Diffstat (limited to 'nose')
-rw-r--r-- | nose/loader.py | 4 |
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: |