From 3285325f5a09e6437edeccc21d555fe1158d2d55 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 4 Dec 2010 19:56:53 +0100 Subject: [PATCH] test for ticket #608 --- tests/run/builtin_type_inheritance_T608.pyx | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/run/builtin_type_inheritance_T608.pyx 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 -- 2.26.2