diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 902904457..53df79d35 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -853,11 +853,9 @@ class FixtureDef(object): exceptions.append(sys.exc_info()) if exceptions: e = exceptions[0] - del ( - exceptions - ) # ensure we don't keep all frames alive because of the traceback + # Ensure to not keep frame references through traceback. + del exceptions six.reraise(*e) - finally: hook = self._fixturemanager.session.gethookproxy(request.node.fspath) hook.pytest_fixture_post_finalizer(fixturedef=self, request=request)