Commit e3b0ef17 authored by Robert Bradshaw's avatar Robert Bradshaw

Test for T808.

parent dd2103a0
# ticket: 808
cimport cython
......@@ -30,6 +31,24 @@ class MyTypeSubClass(MyType):
def __init__(self, *args, **kwargs):
print "INIT"
# See ticket T808, vtab must be set even if there is no __cinit__.
cdef class Base(object):
pass
cdef class Derived(Base):
cpdef int f(self):
return 42
def test_derived_vtab():
"""
>>> test_derived_vtab()
42
"""
cdef Derived d = Derived.__new__(Derived)
return d.f()
# only these can be safely optimised:
@cython.test_assert_path_exists('//PythonCapiCallNode')
......
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