Commit 9866a0f9 by Jason Rhinelander

test_class: use gc_collect instead of detail_reg_inst side-effect

parent b468a3ce
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment