File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 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"]:
569569 def _get_active_fixturedef (
570570 self , argname : str
571571 ) -> 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.
572578 fixturedef = self ._fixture_defs .get (argname )
573579 if fixturedef is not None :
574580 self ._check_scope (fixturedef , fixturedef ._scope )
575581 return fixturedef
576582
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 )
584584
585585 # Prepare a SubRequest object for calling the fixture.
586586 funcitem = self ._pyfuncitem
You can’t perform that action at this time.
0 commit comments