class documentation

class TestStructuredObjectRefcounting:

View In Hierarchy

These tests cover various uses of complicated structured types which include objects and thus require reference counting.
Method test​_structured​_object​_create​_delete Structured object reference counting in creation and deletion
Method test​_structured​_object​_indexing Structured object reference counting for advanced indexing.
Method test​_structured​_object​_item​_setting Structured object reference counting for simple item setting
Method test​_structured​_object​_take​_and​_repeat Structured object reference counting for specialized functions. The older functions such as take and repeat use different code paths then item setting (when writing this).
@pytest.mark.parametrize(['dt', 'pat', 'count', 'singleton'], iter_struct_object_dtypes())
@pytest.mark.parametrize(['creation_func', 'creation_obj'], [pytest.param(np.empty, None, marks=pytest.mark.skip('unreliable due to python\'s behaviour')), (np.ones, 1), (np.zeros, 0)])
def test_structured_object_create_delete(self, dt, pat, count, singleton, creation_func, creation_obj):
Structured object reference counting in creation and deletion
@pytest.mark.parametrize(['dt', 'pat', 'count', 'singleton'], iter_struct_object_dtypes())
@pytest.mark.parametrize(['shape', 'index', 'items_changed'], [((3), ([0, 2]), 2), ((3, 2), ([0, 2], slice(None)), 4), ((3, 2), ([0, 2], [1]), 2), ((3), [True, False, True], 2)])
def test_structured_object_indexing(self, shape, index, items_changed, dt, pat, count, singleton):
Structured object reference counting for advanced indexing.
@pytest.mark.parametrize(['dt', 'pat', 'count', 'singleton'], iter_struct_object_dtypes())
def test_structured_object_item_setting(self, dt, pat, count, singleton):
Structured object reference counting for simple item setting
@pytest.mark.parametrize(['dt', 'pat', 'count', 'singleton'], iter_struct_object_dtypes())
def test_structured_object_take_and_repeat(self, dt, pat, count, singleton):
Structured object reference counting for specialized functions. The older functions such as take and repeat use different code paths then item setting (when writing this).