fixtures: simplify a bit of code
This commit is contained in:
parent
f5de111357
commit
ff551b7685
|
@ -1061,9 +1061,7 @@ class FixtureDef(Generic[FixtureValue]):
|
||||||
# with their finalization.
|
# with their finalization.
|
||||||
for argname in self.argnames:
|
for argname in self.argnames:
|
||||||
fixturedef = request._get_active_fixturedef(argname)
|
fixturedef = request._get_active_fixturedef(argname)
|
||||||
if argname != "request":
|
if not isinstance(fixturedef, PseudoFixtureDef):
|
||||||
# PseudoFixtureDef is only for "request".
|
|
||||||
assert isinstance(fixturedef, FixtureDef)
|
|
||||||
fixturedef.addfinalizer(functools.partial(self.finish, request=request))
|
fixturedef.addfinalizer(functools.partial(self.finish, request=request))
|
||||||
|
|
||||||
my_cache_key = self.cache_key(request)
|
my_cache_key = self.cache_key(request)
|
||||||
|
|
Loading…
Reference in New Issue