diff --git a/_py/test/plugin/pytest_nose.py b/_py/test/plugin/pytest_nose.py index f7bfbfda0..61c7ef1fd 100644 --- a/_py/test/plugin/pytest_nose.py +++ b/_py/test/plugin/pytest_nose.py @@ -85,7 +85,9 @@ def pytest_make_collect_report(collector): def call_optional(obj, name): method = getattr(obj, name, None) if method: - method() - return True - else: - return False + argspec = inspect.getargspec(method) + if argspec[0] == ['self']: + argspec = argspec[1:] + if not any(argspec): + method() + return True