From 0b8b006db49371fe70e51828454d95a0aaa016e3 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 9 May 2019 15:36:49 +0200 Subject: [PATCH] minor: improve formatting --- src/_pytest/fixtures.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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)