Commit 0fbd0a33 authored by Robert Bradshaw's avatar Robert Bradshaw

Failing test for calling derived class destructor in deallocation.

parent 8c6dae36
......@@ -129,6 +129,9 @@ def test_stack_allocation(int w, int h):
cdef class EmptyHolder:
cdef Empty empty
cdef class AnotherEmptyHolder(EmptyHolder):
cdef Empty another_empty
def test_class_member():
"""
>>> test_class_member()
......@@ -145,6 +148,19 @@ def test_class_member():
assert destructor_count - start_destructor_count == 2, \
destructor_count - start_destructor_count
def test_derived_class_member():
"""
>>> test_derived_class_member()
"""
start_constructor_count = constructor_count
start_destructor_count = destructor_count
e = AnotherEmptyHolder()
assert constructor_count - start_constructor_count == 2, \
constructor_count - start_constructor_count
del e
assert destructor_count - start_destructor_count == 2, \
destructor_count - start_destructor_count
cdef class TemplateClassMember:
cdef vector[int] x
cdef vector[vector[Empty]] vec
......
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