fixtures: require `item.fixturenames` to exist in `_fillfixtures`
I could find 2 plugins that would be broken by this (pytest-play and pytest-wdl), but they will be better served by just copying `_fillfixtures` instead of use the private function.
This commit is contained in:
parent
d2b5177dd6
commit
b8906b29a7
|
@ -685,11 +685,7 @@ class TopRequest(FixtureRequest):
|
||||||
|
|
||||||
def _fillfixtures(self) -> None:
|
def _fillfixtures(self) -> None:
|
||||||
item = self._pyfuncitem
|
item = self._pyfuncitem
|
||||||
fixturenames = getattr(item, "fixturenames", None)
|
for argname in item.fixturenames:
|
||||||
if fixturenames is None:
|
|
||||||
# Mildly expensive so don't move into the getattr!
|
|
||||||
fixturenames = self.fixturenames
|
|
||||||
for argname in fixturenames:
|
|
||||||
if argname not in item.funcargs:
|
if argname not in item.funcargs:
|
||||||
item.funcargs[argname] = self.getfixturevalue(argname)
|
item.funcargs[argname] = self.getfixturevalue(argname)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue