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):
|
def call_optional(obj, name):
|
||||||
method = getattr(obj, name, None)
|
method = getattr(obj, name, None)
|
||||||
if method:
|
if method:
|
||||||
method()
|
argspec = inspect.getargspec(method)
|
||||||
return True
|
if argspec[0] == ['self']:
|
||||||
else:
|
argspec = argspec[1:]
|
||||||
return False
|
if not any(argspec):
|
||||||
|
method()
|
||||||
|
return True
|
||||||
|
|
Loading…
Reference in New Issue