diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 0fefaa0d0..7d3c8da11 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -685,7 +685,10 @@ class TopRequest(FixtureRequest): def _fillfixtures(self) -> None: item = self._pyfuncitem - fixturenames = getattr(item, "fixturenames", self.fixturenames) + 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: if argname not in item.funcargs: item.funcargs[argname] = self.getfixturevalue(argname)