File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -569,18 +569,18 @@ def _iter_chain(self) -> Iterator["SubRequest"]:
569
569
def _get_active_fixturedef (
570
570
self , argname : str
571
571
) -> Union ["FixtureDef[object]" , PseudoFixtureDef [object ]]:
572
+ if argname == "request" :
573
+ cached_result = (self , [0 ], None )
574
+ return PseudoFixtureDef (cached_result , Scope .Function )
575
+
576
+ # If we already finished computing a fixture by this name in this item,
577
+ # return it.
572
578
fixturedef = self ._fixture_defs .get (argname )
573
579
if fixturedef is not None :
574
580
self ._check_scope (fixturedef , fixturedef ._scope )
575
581
return fixturedef
576
582
577
- try :
578
- fixturedef = self ._getnextfixturedef (argname )
579
- except FixtureLookupError :
580
- if argname == "request" :
581
- cached_result = (self , [0 ], None )
582
- return PseudoFixtureDef (cached_result , Scope .Function )
583
- raise
583
+ fixturedef = self ._getnextfixturedef (argname )
584
584
585
585
# Prepare a SubRequest object for calling the fixture.
586
586
funcitem = self ._pyfuncitem
You can’t perform that action at this time.
0 commit comments