test for ticket #608
authorStefan Behnel <scoder@users.berlios.de>
Sat, 4 Dec 2010 18:56:53 +0000 (19:56 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 4 Dec 2010 18:56:53 +0000 (19:56 +0100)
tests/run/builtin_type_inheritance_T608.pyx [new file with mode: 0644]

diff --git a/tests/run/builtin_type_inheritance_T608.pyx b/tests/run/builtin_type_inheritance_T608.pyx
new file mode 100644 (file)
index 0000000..dcf04fe
--- /dev/null
@@ -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