From 02e4e0a4c73ff56b650e51d9f0fe3f4e1570786c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 28 Mar 2009 13:47:03 -0700 Subject: [PATCH] test for #183 --- tests/run/cdef_decorator_directives_T183.pyx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/run/cdef_decorator_directives_T183.pyx diff --git a/tests/run/cdef_decorator_directives_T183.pyx b/tests/run/cdef_decorator_directives_T183.pyx new file mode 100644 index 00000000..e3713534 --- /dev/null +++ b/tests/run/cdef_decorator_directives_T183.pyx @@ -0,0 +1,16 @@ +__doc__ = u""" + >>> cdiv_decorator(-12, 5) + -2 + >>> pydiv_decorator(-12, 5) + -3 +""" + +cimport cython + +@cython.cdivision(True) +cpdef cdiv_decorator(int a, int b): + return a / b + +@cython.cdivision(False) +cpdef pydiv_decorator(int a, int b): + return a / b -- 2.26.2