failing test case for ticket #589
authorStefan Behnel <scoder@users.berlios.de>
Sun, 7 Nov 2010 21:21:14 +0000 (22:21 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 7 Nov 2010 21:21:14 +0000 (22:21 +0100)
tests/bugs.txt
tests/run/bound_builtin_methods_T589.pyx [new file with mode: 0644]

index d172b4c68354d741e6862df0de969853c8c81068..7ed33400d149fddf7156fca4ca31869e3e7e7861 100644 (file)
@@ -16,6 +16,7 @@ with_statement_module_level_T536
 function_as_method_T494
 closure_inside_cdef_T554
 ipow_crash_T562
+bound_builtin_methods_T589
 
 
 # CPython regression tests that don't current work:
diff --git a/tests/run/bound_builtin_methods_T589.pyx b/tests/run/bound_builtin_methods_T589.pyx
new file mode 100644 (file)
index 0000000..0439489
--- /dev/null
@@ -0,0 +1,33 @@
+
+cimport cython
+
+def test_set_clear_bound():
+    """
+    >>> type(test_set_clear_bound()) is _set
+    True
+    >>> list(test_set_clear_bound())
+    []
+    """
+    cdef set s1 = set([1])
+    clear = s1.clear
+    clear()
+    return s1
+
+text = u'ab jd  sdflk as sa  sadas asdas fsdf '
+pipe_sep = u'|'
+
+@cython.test_assert_path_exists(
+    "//SimpleCallNode",
+    "//SimpleCallNode//NameNode")
+def test_unicode_join_bound(unicode sep, l):
+    """
+    >>> l = text.split()
+    >>> len(l)
+    8
+    >>> print( pipe_sep.join(l) )
+    ab|jd|sdflk|as|sa|sadas|asdas|fsdf
+    >>> print( test_unicode_join_bound(pipe_sep, l) )
+    ab|jd|sdflk|as|sa|sadas|asdas|fsdf
+    """
+    join = sep.join
+    return join(l)