From cfbfa53f2b0d38de84928fba8a8709003162ea6d Mon Sep 17 00:00:00 2001 From: Victor Maryama Date: Tue, 25 Jun 2019 17:46:56 +0200 Subject: [PATCH] Using pytester subprocess to avoid keeping references in the HookRecorder. --- testing/acceptance_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 60cc21c4a..3f339366e 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -1088,7 +1088,10 @@ def test_fixture_values_leak(testdir): assert fix_of_test1_ref() is None """ ) - result = testdir.runpytest() + # Running on subprocess does not activate the HookRecorder + # which holds itself a reference to objects in case of the + # pytest_assert_reprcompare hook + result = testdir.runpytest_subprocess() result.stdout.fnmatch_lines(["* 2 passed *"])