base metafunc fixtureinfo on the functiondefinition to caputure its marks

This commit is contained in:
Ronny Pfannschmidt 2018-03-17 22:19:17 +01:00
parent 99015bfc86
commit 2d06ae0f65
1 changed files with 2 additions and 1 deletions

View File

@ -367,13 +367,14 @@ class PyCollector(PyobjMixin, nodes.Collector):
cls = clscol and clscol.obj or None
transfer_markers(funcobj, cls, module)
fm = self.session._fixturemanager
fixtureinfo = fm.getfixtureinfo(self, funcobj, cls)
definition = FunctionDefinition(
name=name,
parent=self,
callobj=funcobj,
)
fixtureinfo = fm.getfixtureinfo(definition, funcobj, cls)
metafunc = Metafunc(definition, fixtureinfo, self.config, cls=cls, module=module)
methods = []
if hasattr(module, "pytest_generate_tests"):