Allow tests declared as @staticmethod to use fixtures

Fix #2699
This commit is contained in:
Bruno Oliveira
2017-08-17 20:37:51 -03:00
parent 5c0c1977e3
commit a993add783
5 changed files with 24 additions and 8 deletions

View File

@@ -957,11 +957,7 @@ class FixtureManager:
def getfixtureinfo(self, node, func, cls, funcargs=True):
if funcargs and not hasattr(node, "nofuncargs"):
if cls is not None:
startindex = 1
else:
startindex = None
argnames = getfuncargnames(func, startindex)
argnames = getfuncargnames(func, cls=cls)
else:
argnames = ()
usefixtures = getattr(func, "usefixtures", None)