From 6e8e3c967ada43ba47d0b85842607a5f975c5c81 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 10 Apr 2018 21:07:34 -0300 Subject: [PATCH] Add changelog entry for #2798 --- changelog/2798.bugfix.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/2798.bugfix.rst diff --git a/changelog/2798.bugfix.rst b/changelog/2798.bugfix.rst new file mode 100644 index 00000000000..dc24a724c32 --- /dev/null +++ b/changelog/2798.bugfix.rst @@ -0,0 +1,3 @@ +Reset ``sys.last_type``, ``sys.last_value`` and ``sys.last_traceback`` before each test executes. Those attributes +are added by pytest during the test run to aid debugging, but were never reset so they would create a leaking +reference to the last failing test's frame which in turn could never be reclaimed by the garbage collector.