forked from OSchip/llvm-project
Fix a problem reported by Ed Maste where the test harness was failing to call bound methods as cleanup hooks
llvm-svn: 221624
This commit is contained in:
parent
8e6923b7f2
commit
4c67655b45
|
@ -1039,7 +1039,7 @@ class Base(unittest2.TestCase):
|
|||
print >> sbuf, "Executing tearDown hook:", getsource_if_available(hook)
|
||||
import inspect
|
||||
hook_argc = len(inspect.getargspec(hook).args)
|
||||
if hook_argc == 0:
|
||||
if hook_argc == 0 or hook.im_self:
|
||||
hook()
|
||||
elif hook_argc == 1:
|
||||
hook(self)
|
||||
|
|
Loading…
Reference in New Issue