fixtures: use the item `fixturenames` in `request.fixturenames`

`_pyfuncitem.fixturenames` is just an alias for
`_pyfuncitem._fixtureinfo.names_closure` (at least in core pytest), so
let's do the less abstraction-breaking thing.
This commit is contained in:
Ran Benita 2023-09-01 14:53:36 +03:00
parent 82bd63d318
commit 65c01f531b
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ class FixtureRequest(abc.ABC):
@property @property
def fixturenames(self) -> List[str]: def fixturenames(self) -> List[str]:
"""Names of all active fixtures in this request.""" """Names of all active fixtures in this request."""
result = list(self._pyfuncitem._fixtureinfo.names_closure) result = list(self._pyfuncitem.fixturenames)
result.extend(set(self._fixture_defs).difference(result)) result.extend(set(self._fixture_defs).difference(result))
return result return result