Update src/_pytest/fixtures.py
Co-authored-by: Ran Benita <ran@unusedvar.com>
This commit is contained in:
parent
c40411749a
commit
208638323c
|
@ -407,6 +407,14 @@ class FixtureRequest:
|
|||
self._arg2fixturedefs = fixtureinfo.name2fixturedefs.copy()
|
||||
self._arg2index: Dict[str, int] = {}
|
||||
self._fixturemanager: FixtureManager = pyfuncitem.session._fixturemanager
|
||||
# Notes on the type of `param`:
|
||||
# -`request.param` is only defined in parametrized fixtures, and will raise
|
||||
# AttributeError otherwise. Python typing has no notion of "undefined", so
|
||||
# this cannot be reflected in the type.
|
||||
# - Technically `param` is only (possibly) defined on SubRequest, not
|
||||
# FixtureRequest, but the typing of that is still in flux so this cheats.
|
||||
# - In the future we might consider using a generic for the param type, but
|
||||
# for now just using Any.
|
||||
self.param: Any
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue