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:
Ran Benita 2023-09-01 15:13:15 +03:00
parent d2b5177dd6
commit b8906b29a7
1 changed files with 1 additions and 5 deletions

View File

@ -685,11 +685,7 @@ class TopRequest(FixtureRequest):
def _fillfixtures(self) -> None:
item = self._pyfuncitem
fixturenames = getattr(item, "fixturenames", None)
if fixturenames is None:
# Mildly expensive so don't move into the getattr!
fixturenames = self.fixturenames
for argname in fixturenames:
for argname in item.fixturenames:
if argname not in item.funcargs:
item.funcargs[argname] = self.getfixturevalue(argname)