Fix various minor memory leaks in the tests (found by Valgrind in #2746) (#2758)

* Fix leak in the test_copy_move::test_move_fallback

* Fix leaking PyMethodDef in test_class::test_implicit_conversion_life_support

* Plumb leak in test_buffer, occuring when a mutable buffer is requested for a read-only object, and enable test_buffer.py

* Fix weird return_value_policy::reference in test_stl_binders, and enable those tests

* Cleanup nodelete holder objects in test_smart_ptr, and enable those tests
This commit is contained in:
Yannick Jadoul
2021-01-01 17:05:22 +01:00
committed by GitHub
parent e612043d43
commit e57dd4717e
8 changed files with 68 additions and 26 deletions

View File

@@ -119,7 +119,7 @@ def test_private_op_new():
def test_move_fallback():
"""#389: rvp::move should fall-through to copy on non-movable objects"""
m2 = m.get_moveissue2(2)
assert m2.value == 2
m1 = m.get_moveissue1(1)
assert m1.value == 1
m2 = m.get_moveissue2(2)
assert m2.value == 2