Using pytester subprocess to avoid keeping references in the HookRecorder.

This commit is contained in:
Victor Maryama 2019-06-25 17:46:56 +02:00
parent db50a975fd
commit cfbfa53f2b
1 changed files with 4 additions and 1 deletions

View File

@ -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 *"])