diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 1c94583e8..13c1790be 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -525,7 +525,7 @@ class FixtureRequest(abc.ABC): :param msg: An optional custom error message. """ - raise self._fixturemanager.FixtureLookupError(None, self, msg) + raise FixtureLookupError(None, self, msg) def getfixturevalue(self, argname: str) -> Any: """Dynamically run a named fixture function. @@ -1438,9 +1438,6 @@ class FixtureManager: by a lookup of their FuncFixtureInfo. """ - FixtureLookupError = FixtureLookupError - FixtureLookupErrorRepr = FixtureLookupErrorRepr - def __init__(self, session: "Session") -> None: self.session = session self.config: Config = session.config