From: Stefan Behnel Date: Mon, 8 Feb 2010 10:08:37 +0000 (+0100) Subject: new test case for ticket #505 (cimport cython) X-Git-Tag: 0.13.beta0~349^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dff3c9e0274f3dde3d3f55d437650b59e5168f1f;p=cython.git new test case for ticket #505 (cimport cython) --- diff --git a/tests/run/cimport_cython_T505.pyx b/tests/run/cimport_cython_T505.pyx new file mode 100644 index 00000000..13a89d83 --- /dev/null +++ b/tests/run/cimport_cython_T505.pyx @@ -0,0 +1,11 @@ +cimport cython + +cdef extern from "Python.h": + cdef cython.unicode PyUnicode_DecodeUTF8(char* s, Py_ssize_t size, char* errors) + +def test_capi(): + """ + >>> print(test_capi()) + abc + """ + return PyUnicode_DecodeUTF8("abc", 3, NULL)