Skip to content

Commit

Permalink
Update fixtures.py
Browse files Browse the repository at this point in the history
Revert due to pytest-dev#6962.
  • Loading branch information
DH-MP authored Mar 4, 2022
1 parent 4e7a69d commit 94d8803
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/_pytest/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,10 +1053,8 @@ def execute(self, request: SubRequest) -> _FixtureValue:

my_cache_key = self.cache_key(request)
if self.cached_result is not None:
# note: comparison with `==` can fail (or be expensive) for e.g.
# numpy arrays (#6497).
cache_key = self.cached_result[1]
if my_cache_key is cache_key:
if my_cache_key == cache_key:
if self.cached_result[2] is not None:
_, val, tb = self.cached_result[2]
raise val.with_traceback(tb)
Expand Down

0 comments on commit 94d8803

Please sign in to comment.