nose plugin wont call setup functions that arent made for it
--HG-- branch : trunk
This commit is contained in:
parent
8e5efa7d6d
commit
5f3bdf2d0b
|
@ -85,7 +85,9 @@ def pytest_make_collect_report(collector):
|
|||
def call_optional(obj, name):
|
||||
method = getattr(obj, name, None)
|
||||
if method:
|
||||
argspec = inspect.getargspec(method)
|
||||
if argspec[0] == ['self']:
|
||||
argspec = argspec[1:]
|
||||
if not any(argspec):
|
||||
method()
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue