Merge pull request #12154 from bluetech/fixtures-cache-key-idx
fixtures: stop using `request.param_index` in fixture cache key
This commit is contained in:
commit
cfc4cf074e
|
@ -1072,7 +1072,7 @@ class FixtureDef(Generic[FixtureValue]):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def cache_key(self, request: SubRequest) -> object:
|
def cache_key(self, request: SubRequest) -> object:
|
||||||
return request.param_index if not hasattr(request, "param") else request.param
|
return getattr(request, "param", None)
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return f"<FixtureDef argname={self.argname!r} scope={self.scope!r} baseid={self.baseid!r}>"
|
return f"<FixtureDef argname={self.argname!r} scope={self.scope!r} baseid={self.baseid!r}>"
|
||||||
|
|
Loading…
Reference in New Issue