Fix collection of staticmethods defined with functools.partial

Related to #5701
This commit is contained in:
Thomas Grainger
2019-08-06 15:02:46 +01:00
committed by Bruno Oliveira
parent a295a3ddaf
commit 137255816e
6 changed files with 65 additions and 55 deletions

View File

@@ -828,7 +828,7 @@ class FixtureDef:
where=baseid,
)
self.params = params
self.argnames = getfuncargnames(func, is_method=unittest)
self.argnames = getfuncargnames(func, name=argname, is_method=unittest)
self.unittest = unittest
self.ids = ids
self._finalizers = []
@@ -1143,7 +1143,7 @@ class FixtureManager:
def getfixtureinfo(self, node, func, cls, funcargs=True):
if funcargs and not getattr(node, "nofuncargs", False):
argnames = getfuncargnames(func, cls=cls)
argnames = getfuncargnames(func, name=node.name, cls=cls)
else:
argnames = ()