From: Stefan Behnel Date: Sat, 4 Dec 2010 18:56:53 +0000 (+0100) Subject: test for ticket #608 X-Git-Tag: 0.14.alpha0~16 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3285325f5a09e6437edeccc21d555fe1158d2d55;p=cython.git test for ticket #608 --- diff --git a/tests/run/builtin_type_inheritance_T608.pyx b/tests/run/builtin_type_inheritance_T608.pyx new file mode 100644 index 00000000..dcf04fe6 --- /dev/null +++ b/tests/run/builtin_type_inheritance_T608.pyx @@ -0,0 +1,47 @@ + +cdef class MyInt(int): + """ + >>> MyInt(2) == 2 + True + >>> MyInt(2).attr is None + True + """ + cdef readonly object attr + +cdef class MyFloat(float): + """ + >>> MyFloat(1.0)== 1.0 + True + >>> MyFloat(1.0).attr is None + True + """ + cdef readonly object attr + +ustring = u'abc' + +cdef class MyUnicode(unicode): + """ + >>> MyUnicode(ustring) == ustring + True + >>> MyUnicode(ustring).attr is None + True + """ + cdef readonly object attr + +cdef class MyList(list): + """ + >>> MyList([1,2,3]) == [1,2,3] + True + >>> MyList([1,2,3]).attr is None + True + """ + cdef readonly object attr + +cdef class MyDict(dict): + """ + >>> MyDict({1:2, 3:4}) == {1:2, 3:4} + True + >>> MyDict({1:2, 3:4}).attr is None + True + """ + cdef readonly object attr