Skip to content

Commit 6d3fe0b

Browse files
committed
Explicitly clear finalizers list in finalize to ensure cleanup
1 parent bdad345 commit 6d3fe0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

_pytest/fixtures.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ def finish(self, request):
765765
# keep instances alive
766766
if hasattr(self, "cached_result"):
767767
del self.cached_result
768+
self._finalizer = []
768769

769770
def execute(self, request):
770771
# get required arguments and register our own finish()

0 commit comments

Comments
 (0)