From 9866a0f994dc83d587314e58b7f5bfb179b5b3a2 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Wed, 26 Jul 2017 13:52:53 -0400 Subject: [PATCH] test_class: use gc_collect instead of detail_reg_inst side-effect --- tests/test_class.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_class.py b/tests/test_class.py index 9236400e..e62f9827 100644 --- a/tests/test_class.py +++ b/tests/test_class.py @@ -159,11 +159,11 @@ def test_operator_new_delete(capture): with capture: del a - ConstructorStats.detail_reg_inst() + pytest.gc_collect() del b - ConstructorStats.detail_reg_inst() + pytest.gc_collect() del d - ConstructorStats.detail_reg_inst() + pytest.gc_collect() assert capture == """ A delete B delete 4 @@ -172,9 +172,9 @@ def test_operator_new_delete(capture): with capture: del c - ConstructorStats.detail_reg_inst() + pytest.gc_collect() del c2 - ConstructorStats.detail_reg_inst() + pytest.gc_collect() assert capture == ( "C delete " + sz_noalias + "\n" + "C delete " + sz_alias + "\n"