From: Stefan Behnel Date: Sun, 26 Oct 2008 16:59:17 +0000 (+0100) Subject: new error test case for string to int conversion X-Git-Tag: 0.9.9.2.beta~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=006262f0963e853023dfd28fa4183d62648fd8a5;p=cython.git new error test case for string to int conversion --- diff --git a/tests/errors/e_strcoerce.pyx b/tests/errors/e_strcoerce.pyx new file mode 100644 index 00000000..c8a508a7 --- /dev/null +++ b/tests/errors/e_strcoerce.pyx @@ -0,0 +1,8 @@ +cdef int c1 = "t" # works +cdef int c2 = "te" # fails +cdef int cx = "test" # fails + +_ERRORS = """ +2:14: Only coerce single-character ascii strings can be used as ints. +3:14: Only coerce single-character ascii strings can be used as ints. +"""