From: Robert Bradshaw Date: Fri, 1 Apr 2011 19:48:57 +0000 (-0700) Subject: Add tags to test files. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c8665b070af637c375ccf6377b3111a8a1459a87;p=cython.git Add tags to test files. --- diff --git a/tests/compile/a_capi.pyx b/tests/compile/a_capi.pyx index d4acf9c3..8aefe305 100644 --- a/tests/compile/a_capi.pyx +++ b/tests/compile/a_capi.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef public struct Foo: int a, b diff --git a/tests/compile/argdefault.pyx b/tests/compile/argdefault.pyx index e008fede..2b62c5d1 100644 --- a/tests/compile/argdefault.pyx +++ b/tests/compile/argdefault.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef swallow def spam(w, int x = 42, y = "grail", z = swallow): diff --git a/tests/compile/arrayargs.pyx b/tests/compile/arrayargs.pyx index 535e4319..bdc90407 100644 --- a/tests/compile/arrayargs.pyx +++ b/tests/compile/arrayargs.pyx @@ -1,3 +1,4 @@ +# mode: compile cdef extern from *: diff --git a/tests/compile/arrayptrcompat.pyx b/tests/compile/arrayptrcompat.pyx index c38df36a..1b797769 100644 --- a/tests/compile/arrayptrcompat.pyx +++ b/tests/compile/arrayptrcompat.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef enum E: z diff --git a/tests/compile/arraytoptrarg.pyx b/tests/compile/arraytoptrarg.pyx index 57f9be38..2afa45fc 100644 --- a/tests/compile/arraytoptrarg.pyx +++ b/tests/compile/arraytoptrarg.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f1(char *argv[]): f2(argv) diff --git a/tests/compile/ass2longlong.pyx b/tests/compile/ass2longlong.pyx index 87457ee1..8127cc34 100644 --- a/tests/compile/ass2longlong.pyx +++ b/tests/compile/ass2longlong.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void spam(): cdef long long L cdef unsigned long long U diff --git a/tests/compile/assert2.pyx b/tests/compile/assert2.pyx index f34c0964..f53040df 100644 --- a/tests/compile/assert2.pyx +++ b/tests/compile/assert2.pyx @@ -1,2 +1,4 @@ +# mode: compile + def f(a, b): assert a, a+b diff --git a/tests/compile/behnel4.pyx b/tests/compile/behnel4.pyx index de064c07..e8b4f4eb 100644 --- a/tests/compile/behnel4.pyx +++ b/tests/compile/behnel4.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef enum E: spam, eggs diff --git a/tests/compile/belchenko1.pyx b/tests/compile/belchenko1.pyx index f7437212..12a31b48 100644 --- a/tests/compile/belchenko1.pyx +++ b/tests/compile/belchenko1.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from *: ctypedef int intptr_t diff --git a/tests/compile/bufaccess_noassignT444.pyx b/tests/compile/bufaccess_noassignT444.pyx index 061a4e2d..3a3b3876 100644 --- a/tests/compile/bufaccess_noassignT444.pyx +++ b/tests/compile/bufaccess_noassignT444.pyx @@ -1,3 +1,5 @@ +# ticket: 444 +# mode: compile def test(): cdef object[int] not_assigned_to diff --git a/tests/compile/builtin.pyx b/tests/compile/builtin.pyx index 542e5327..9ae30fdb 100644 --- a/tests/compile/builtin.pyx +++ b/tests/compile/builtin.pyx @@ -1,2 +1,4 @@ +# mode: compile + def f(): x = open("foo") diff --git a/tests/compile/builtinfuncs.pyx b/tests/compile/builtinfuncs.pyx index 096ee870..86379bde 100644 --- a/tests/compile/builtinfuncs.pyx +++ b/tests/compile/builtinfuncs.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int f() except -1: cdef object x, y, z, w cdef int i diff --git a/tests/compile/c_directives.pyx b/tests/compile/c_directives.pyx index 1d505daa..0ede90ba 100644 --- a/tests/compile/c_directives.pyx +++ b/tests/compile/c_directives.pyx @@ -1,3 +1,4 @@ +# mode: compile # cython: boundscheck = False # cython: ignoreme = OK # cython: warn.undeclared = False diff --git a/tests/compile/callingconvention.pyx b/tests/compile/callingconvention.pyx index 0e3fa9db..ce236ed7 100644 --- a/tests/compile/callingconvention.pyx +++ b/tests/compile/callingconvention.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "callingconvention.h": pass diff --git a/tests/compile/cargdef.pyx b/tests/compile/cargdef.pyx index 58421cb8..55fe9b74 100644 --- a/tests/compile/cargdef.pyx +++ b/tests/compile/cargdef.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(obj, int i, float f, char *s1, char s2[]): pass diff --git a/tests/compile/carrdecl.pyx b/tests/compile/carrdecl.pyx index 44cba442..930e2d19 100644 --- a/tests/compile/carrdecl.pyx +++ b/tests/compile/carrdecl.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef extern: cdef func(int[]) diff --git a/tests/compile/cascmp.pyx b/tests/compile/cascmp.pyx index d2ebddb5..c36997fb 100644 --- a/tests/compile/cascmp.pyx +++ b/tests/compile/cascmp.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void foo(): cdef int bool, int1=0, int2=0, int3=0, int4=0 cdef object obj1, obj2, obj3, obj4 diff --git a/tests/compile/cassign.pyx b/tests/compile/cassign.pyx index a6bd7994..6a21c19e 100644 --- a/tests/compile/cassign.pyx +++ b/tests/compile/cassign.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void foo(): cdef int i1, i2=0 cdef char c1=0, c2 diff --git a/tests/compile/cast_ctypedef_array_T518.pyx b/tests/compile/cast_ctypedef_array_T518.pyx index f6785062..a62f4cf4 100644 --- a/tests/compile/cast_ctypedef_array_T518.pyx +++ b/tests/compile/cast_ctypedef_array_T518.pyx @@ -1,3 +1,6 @@ +# ticket: 518 +# mode: compile + cdef extern from "cast_ctypedef_array_T518_helper.h": cdef struct __foo_struct: int i, j diff --git a/tests/compile/casttoexttype.pyx b/tests/compile/casttoexttype.pyx index 518ae0f7..b497cab9 100644 --- a/tests/compile/casttoexttype.pyx +++ b/tests/compile/casttoexttype.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern class external.Spam: pass diff --git a/tests/compile/cdefexternempty.pyx b/tests/compile/cdefexternempty.pyx index be4d65ca..33053edc 100644 --- a/tests/compile/cdefexternempty.pyx +++ b/tests/compile/cdefexternempty.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "cheese.h": pass diff --git a/tests/compile/cdefexternfromstar.pyx b/tests/compile/cdefexternfromstar.pyx index 11ecbdf2..1a3c3fd4 100644 --- a/tests/compile/cdefexternfromstar.pyx +++ b/tests/compile/cdefexternfromstar.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from *: int spam diff --git a/tests/compile/cenum.pyx b/tests/compile/cenum.pyx index 4b90156e..33d5c230 100644 --- a/tests/compile/cenum.pyx +++ b/tests/compile/cenum.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef enum Spam: a b, c, diff --git a/tests/compile/cforfromloop.pyx b/tests/compile/cforfromloop.pyx index 2466f825..1a769824 100644 --- a/tests/compile/cforfromloop.pyx +++ b/tests/compile/cforfromloop.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int i, j, k cdef object a, b, x diff --git a/tests/compile/cimport_package_module_T4.pyx b/tests/compile/cimport_package_module_T4.pyx index 54367cb6..28403f12 100644 --- a/tests/compile/cimport_package_module_T4.pyx +++ b/tests/compile/cimport_package_module_T4.pyx @@ -1,3 +1,6 @@ +# ticket: 4 +# mode: compile + from a cimport b cdef int **t = b.foo(NULL) diff --git a/tests/compile/cimportfrom_T248.pyx b/tests/compile/cimportfrom_T248.pyx index 6be75506..13796baf 100644 --- a/tests/compile/cimportfrom_T248.pyx +++ b/tests/compile/cimportfrom_T248.pyx @@ -1,3 +1,6 @@ +# ticket: 248 +# mode: compile + from ewing8 cimport (Foo, diff --git a/tests/compile/classmethargdefault.pyx b/tests/compile/classmethargdefault.pyx index 3d246eff..1bed42a7 100644 --- a/tests/compile/classmethargdefault.pyx +++ b/tests/compile/classmethargdefault.pyx @@ -1,3 +1,5 @@ +# mode: compile + __doc__ = u""" >>> s = Swallow() >>> s.spam(1) diff --git a/tests/compile/cnamespec.pyx b/tests/compile/cnamespec.pyx index 161045e8..f67911d6 100644 --- a/tests/compile/cnamespec.pyx +++ b/tests/compile/cnamespec.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "cnamespec.h": int a "c_a", b "c_b" diff --git a/tests/compile/cnumop.pyx b/tests/compile/cnumop.pyx index d94bd8d1..5b0f1063 100644 --- a/tests/compile/cnumop.pyx +++ b/tests/compile/cnumop.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(): cdef int int1, int2=0, int3=1 cdef char char1=0 diff --git a/tests/compile/coercetovoidptr.pyx b/tests/compile/coercetovoidptr.pyx index 38c2705b..c6032aea 100644 --- a/tests/compile/coercetovoidptr.pyx +++ b/tests/compile/coercetovoidptr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f(): cdef void *p cdef char *q=NULL diff --git a/tests/compile/complexbasetype.pyx b/tests/compile/complexbasetype.pyx index 2e56dcdc..6976eda2 100644 --- a/tests/compile/complexbasetype.pyx +++ b/tests/compile/complexbasetype.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern (int *[42]) spam, grail, swallow cdef (int (*)()) brian(): diff --git a/tests/compile/constexpr.pyx b/tests/compile/constexpr.pyx index c76b5a3e..d5daa042 100644 --- a/tests/compile/constexpr.pyx +++ b/tests/compile/constexpr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef enum Grail: k = 42 diff --git a/tests/compile/coventry1.pyx b/tests/compile/coventry1.pyx index 828c1fc9..f9ff1873 100644 --- a/tests/compile/coventry1.pyx +++ b/tests/compile/coventry1.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef class Tst: cdef foo, diff --git a/tests/compile/cpdef.pyx b/tests/compile/cpdef.pyx index 1c3ed528..7eec85f7 100644 --- a/tests/compile/cpdef.pyx +++ b/tests/compile/cpdef.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class A: cpdef a(self): ma(self) diff --git a/tests/compile/cpp_enums.pyx b/tests/compile/cpp_enums.pyx index bccfacd6..b738dee0 100644 --- a/tests/compile/cpp_enums.pyx +++ b/tests/compile/cpp_enums.pyx @@ -1,3 +1,6 @@ +# tag: cpp +# mode: compile + cdef extern from "cpp_enums.h": cdef enum Enum1: Item1 diff --git a/tests/compile/cpp_operators.pyx b/tests/compile/cpp_operators.pyx index 6b661b6b..a38dba14 100644 --- a/tests/compile/cpp_operators.pyx +++ b/tests/compile/cpp_operators.pyx @@ -1,3 +1,6 @@ +# tag: cpp +# mode: compile + cdef extern from "operators.h": cdef cppclass Operators: Operators(int) diff --git a/tests/compile/cpp_structs.pyx b/tests/compile/cpp_structs.pyx index c7b86935..3aac0cd8 100644 --- a/tests/compile/cpp_structs.pyx +++ b/tests/compile/cpp_structs.pyx @@ -1,3 +1,6 @@ +# tag: cpp +# mode: compile + cdef extern from "point.h" namespace "geometry": cdef struct Point: diff --git a/tests/compile/cpp_templated_ctypedef.pyx b/tests/compile/cpp_templated_ctypedef.pyx index 634b46f5..1051a648 100644 --- a/tests/compile/cpp_templated_ctypedef.pyx +++ b/tests/compile/cpp_templated_ctypedef.pyx @@ -1,3 +1,6 @@ +# tag: cpp +# mode: compile + cdef extern from *: cdef cppclass Foo[T]: pass diff --git a/tests/compile/cpp_templates.pyx b/tests/compile/cpp_templates.pyx index 7fba995f..fefa96be 100644 --- a/tests/compile/cpp_templates.pyx +++ b/tests/compile/cpp_templates.pyx @@ -1,3 +1,6 @@ +# tag: cpp +# mode: compile + cdef extern from "templates.h": cdef cppclass TemplateTest1[T]: TemplateTest1() diff --git a/tests/compile/cstructreturn.pyx b/tests/compile/cstructreturn.pyx index cf2af37b..3d516dd2 100644 --- a/tests/compile/cstructreturn.pyx +++ b/tests/compile/cstructreturn.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef struct Foo: int blarg diff --git a/tests/compile/ctypedef.pyx b/tests/compile/ctypedef.pyx index 6b557842..23ea01bc 100644 --- a/tests/compile/ctypedef.pyx +++ b/tests/compile/ctypedef.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef int *IntPtr ctypedef unsigned long ULong cdef extern IntPtr spam diff --git a/tests/compile/ctypedef_public_class_T355.pyx b/tests/compile/ctypedef_public_class_T355.pyx index 18178e40..505f9d67 100644 --- a/tests/compile/ctypedef_public_class_T355.pyx +++ b/tests/compile/ctypedef_public_class_T355.pyx @@ -1,3 +1,6 @@ +# ticket: 355 +# mode: compile + ctypedef public class Time [type MyTime_Type, object MyTimeObject]: def __init__(self, seconds): self.seconds = seconds diff --git a/tests/compile/ctypedefclass.pyx b/tests/compile/ctypedefclass.pyx index cebd75c3..70fec73b 100644 --- a/tests/compile/ctypedefclass.pyx +++ b/tests/compile/ctypedefclass.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef class spam: pass diff --git a/tests/compile/ctypedefenum.pyx b/tests/compile/ctypedefenum.pyx index 3810f484..fc22b053 100644 --- a/tests/compile/ctypedefenum.pyx +++ b/tests/compile/ctypedefenum.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef enum parrot_state: alive = 1 dead = 2 diff --git a/tests/compile/ctypedefpubapi.pyx b/tests/compile/ctypedefpubapi.pyx index 091dc3d8..e7d3d428 100644 --- a/tests/compile/ctypedefpubapi.pyx +++ b/tests/compile/ctypedefpubapi.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef public api class Foo [type PyFoo_Type, object PyFooObject]: pass diff --git a/tests/compile/ctypedefstruct.pyx b/tests/compile/ctypedefstruct.pyx index 825583ec..703cada7 100644 --- a/tests/compile/ctypedefstruct.pyx +++ b/tests/compile/ctypedefstruct.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef struct order: int spam int eggs diff --git a/tests/compile/ctypedefunion.pyx b/tests/compile/ctypedefunion.pyx index aea47199..b0648f30 100644 --- a/tests/compile/ctypedefunion.pyx +++ b/tests/compile/ctypedefunion.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef union pet: int cat float dog diff --git a/tests/compile/cunsignedlong.pyx b/tests/compile/cunsignedlong.pyx index fe72850f..15cac5ed 100644 --- a/tests/compile/cunsignedlong.pyx +++ b/tests/compile/cunsignedlong.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f(): cdef unsigned long x cdef object y=0 diff --git a/tests/compile/cverylongtypes.pyx b/tests/compile/cverylongtypes.pyx index 47d3a73b..ec6063ce 100644 --- a/tests/compile/cverylongtypes.pyx +++ b/tests/compile/cverylongtypes.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern short int s cdef extern long int l cdef extern long long ll diff --git a/tests/compile/declandimpl.pyx b/tests/compile/declandimpl.pyx index 760ba7a9..3445fbff 100644 --- a/tests/compile/declandimpl.pyx +++ b/tests/compile/declandimpl.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Tomato: def eject(self): diff --git a/tests/compile/declarations.pyx b/tests/compile/declarations.pyx index b8705770..52ba46b0 100644 --- a/tests/compile/declarations.pyx +++ b/tests/compile/declarations.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "declarations.h": pass diff --git a/tests/compile/del.pyx b/tests/compile/del.pyx index a89761b8..5ad36b40 100644 --- a/tests/compile/del.pyx +++ b/tests/compile/del.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(a, b): global g del g diff --git a/tests/compile/delslice.pyx b/tests/compile/delslice.pyx index 20d192c2..5d7c9b39 100644 --- a/tests/compile/delslice.pyx +++ b/tests/compile/delslice.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void spam(): cdef object x del x[17:42] diff --git a/tests/compile/docstrings.pyx b/tests/compile/docstrings.pyx index 1c258f7c..378b0af5 100644 --- a/tests/compile/docstrings.pyx +++ b/tests/compile/docstrings.pyx @@ -1,3 +1,5 @@ +# mode: compile + "Welcome to the parrot module. It is currently resting." def zap(polly, volts): diff --git a/tests/compile/doda1.pyx b/tests/compile/doda1.pyx index 15b089d7..791e7129 100644 --- a/tests/compile/doda1.pyx +++ b/tests/compile/doda1.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: pass diff --git a/tests/compile/dotted_cimport.pyx b/tests/compile/dotted_cimport.pyx index c9362671..85a2e234 100644 --- a/tests/compile/dotted_cimport.pyx +++ b/tests/compile/dotted_cimport.pyx @@ -1,2 +1,4 @@ +# mode: compile + cimport dotted_cimport_submodule.a import dotted_cimport_submodule.b diff --git a/tests/compile/drake1.pyx b/tests/compile/drake1.pyx index afb09f0f..80c79167 100644 --- a/tests/compile/drake1.pyx +++ b/tests/compile/drake1.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef char *s s = r'\"HT\"' diff --git a/tests/compile/ellipsis_T488.pyx b/tests/compile/ellipsis_T488.pyx index a745112e..d90d2163 100644 --- a/tests/compile/ellipsis_T488.pyx +++ b/tests/compile/ellipsis_T488.pyx @@ -1,3 +1,5 @@ +# ticket: 488 +# mode: compile #from ... import foo print ... diff --git a/tests/compile/emptytry.pyx b/tests/compile/emptytry.pyx index 8cdc71de..747bd2b8 100644 --- a/tests/compile/emptytry.pyx +++ b/tests/compile/emptytry.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f(): try: pass diff --git a/tests/compile/enumintcompat.pyx b/tests/compile/enumintcompat.pyx index 0a56a6db..aee38aa6 100644 --- a/tests/compile/enumintcompat.pyx +++ b/tests/compile/enumintcompat.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef enum E: a diff --git a/tests/compile/eqcmp.pyx b/tests/compile/eqcmp.pyx index ec99f63b..05447b68 100644 --- a/tests/compile/eqcmp.pyx +++ b/tests/compile/eqcmp.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void foo(): cdef int bool, int1=0, int2=0 cdef float float1=0, float2=0 diff --git a/tests/compile/ewing1.pyx b/tests/compile/ewing1.pyx index 689abfc3..1445d671 100644 --- a/tests/compile/ewing1.pyx +++ b/tests/compile/ewing1.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int blarg(int i): pass diff --git a/tests/compile/ewing3.pyx b/tests/compile/ewing3.pyx index 1f02b7ce..01eaf052 100644 --- a/tests/compile/ewing3.pyx +++ b/tests/compile/ewing3.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class C: cdef f(self): pass diff --git a/tests/compile/ewing4.pyx b/tests/compile/ewing4.pyx index 1d86f3df..902707a5 100644 --- a/tests/compile/ewing4.pyx +++ b/tests/compile/ewing4.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f(): "This is a pseudo doc string." diff --git a/tests/compile/ewing5.pyx b/tests/compile/ewing5.pyx index d55e314e..aa72ffa8 100644 --- a/tests/compile/ewing5.pyx +++ b/tests/compile/ewing5.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef char *f(): raise Exception diff --git a/tests/compile/ewing6.pyx b/tests/compile/ewing6.pyx index c7c05069..11baeefe 100644 --- a/tests/compile/ewing6.pyx +++ b/tests/compile/ewing6.pyx @@ -1,3 +1,4 @@ +# mode: compile # Spurious gcc3.3 warnings about incompatible pointer # types passed to C method diff --git a/tests/compile/ewing7.pyx b/tests/compile/ewing7.pyx index e3028c76..2544f19c 100644 --- a/tests/compile/ewing7.pyx +++ b/tests/compile/ewing7.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class A: cdef void f(self, x): pass diff --git a/tests/compile/ewing8.pyx b/tests/compile/ewing8.pyx index d6717bf1..c7fa306b 100644 --- a/tests/compile/ewing8.pyx +++ b/tests/compile/ewing8.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef class Blarg: pass diff --git a/tests/compile/ewing9.pyx b/tests/compile/ewing9.pyx index e4b0365d..3bda53d5 100644 --- a/tests/compile/ewing9.pyx +++ b/tests/compile/ewing9.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef struct xmlDoc: int i diff --git a/tests/compile/excvalcheck.pyx b/tests/compile/excvalcheck.pyx index 9c84eb62..5044d5b4 100644 --- a/tests/compile/excvalcheck.pyx +++ b/tests/compile/excvalcheck.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "excvalcheck.h": pass diff --git a/tests/compile/excvaldecl.pyx b/tests/compile/excvaldecl.pyx index fd1a446a..63f3c65d 100644 --- a/tests/compile/excvaldecl.pyx +++ b/tests/compile/excvaldecl.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int spam() except 42: pass diff --git a/tests/compile/excvalreturn.pyx b/tests/compile/excvalreturn.pyx index ee6a7db8..235fff62 100644 --- a/tests/compile/excvalreturn.pyx +++ b/tests/compile/excvalreturn.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int spam() except -1: eggs = 42 diff --git a/tests/compile/extargdefault.pyx b/tests/compile/extargdefault.pyx index f6e070f2..158e821c 100644 --- a/tests/compile/extargdefault.pyx +++ b/tests/compile/extargdefault.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern class somewhere.Swallow: pass diff --git a/tests/compile/extcmethcall.pyx b/tests/compile/extcmethcall.pyx index d9815e35..3dc693e7 100644 --- a/tests/compile/extcmethcall.pyx +++ b/tests/compile/extcmethcall.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: cdef int tons diff --git a/tests/compile/extcoerce.pyx b/tests/compile/extcoerce.pyx index fb2d5888..a6643260 100644 --- a/tests/compile/extcoerce.pyx +++ b/tests/compile/extcoerce.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Grail: def __add__(int x, float y): diff --git a/tests/compile/extdelattr.pyx b/tests/compile/extdelattr.pyx index a77f84e9..41bc27b9 100644 --- a/tests/compile/extdelattr.pyx +++ b/tests/compile/extdelattr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __delattr__(self, n): diff --git a/tests/compile/extdelitem.pyx b/tests/compile/extdelitem.pyx index c6104ff2..4e4bcf7d 100644 --- a/tests/compile/extdelitem.pyx +++ b/tests/compile/extdelitem.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __delitem__(self, i): diff --git a/tests/compile/extdelslice.pyx b/tests/compile/extdelslice.pyx index cfdfff60..611a3c5e 100644 --- a/tests/compile/extdelslice.pyx +++ b/tests/compile/extdelslice.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __delslice__(self, Py_ssize_t i, Py_ssize_t j): diff --git a/tests/compile/extdescrdel.pyx b/tests/compile/extdescrdel.pyx index b49516a7..09a09124 100644 --- a/tests/compile/extdescrdel.pyx +++ b/tests/compile/extdescrdel.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Foo: def __delete__(self, i): diff --git a/tests/compile/extdescrget.pyx b/tests/compile/extdescrget.pyx index b988a46f..181dc499 100644 --- a/tests/compile/extdescrget.pyx +++ b/tests/compile/extdescrget.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Foo: def __get__(self, i, c): diff --git a/tests/compile/extdescrset.pyx b/tests/compile/extdescrset.pyx index 50161aac..deb59c28 100644 --- a/tests/compile/extdescrset.pyx +++ b/tests/compile/extdescrset.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Foo: def __set__(self, i, v): diff --git a/tests/compile/extern.pyx b/tests/compile/extern.pyx index 958e40d6..a3d57df1 100644 --- a/tests/compile/extern.pyx +++ b/tests/compile/extern.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern int i cdef extern char *s[] cdef extern void spam(char c) diff --git a/tests/compile/extexttype.pyx b/tests/compile/extexttype.pyx index 8d63dce7..1c51aada 100644 --- a/tests/compile/extexttype.pyx +++ b/tests/compile/extexttype.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern class external.Spam [object SpamObject]: pass diff --git a/tests/compile/extforward.pyx b/tests/compile/extforward.pyx index fd571a14..2a034602 100644 --- a/tests/compile/extforward.pyx +++ b/tests/compile/extforward.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam cdef class Grail: diff --git a/tests/compile/extgetattr.pyx b/tests/compile/extgetattr.pyx index c18fa929..9aec9582 100644 --- a/tests/compile/extgetattr.pyx +++ b/tests/compile/extgetattr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __getattr__(self, x): diff --git a/tests/compile/extgetitem.pyx b/tests/compile/extgetitem.pyx index 2f5cc7ed..4612f7f4 100644 --- a/tests/compile/extgetitem.pyx +++ b/tests/compile/extgetitem.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __getitem__(self, x): diff --git a/tests/compile/exthash.pyx b/tests/compile/exthash.pyx index 865edb70..20d9ebb2 100644 --- a/tests/compile/exthash.pyx +++ b/tests/compile/exthash.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __hash__(self): diff --git a/tests/compile/extimported.pyx b/tests/compile/extimported.pyx index 7d32048d..1ef503ba 100644 --- a/tests/compile/extimported.pyx +++ b/tests/compile/extimported.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern class Spam.Eggs.Ham: pass diff --git a/tests/compile/extimportedsubtype.pyx b/tests/compile/extimportedsubtype.pyx index c1fb7514..8096a556 100644 --- a/tests/compile/extimportedsubtype.pyx +++ b/tests/compile/extimportedsubtype.pyx @@ -1,3 +1,5 @@ +# mode: compile + from crunchytype cimport Crunchy cdef class Sub2(Crunchy): diff --git a/tests/compile/extindex.pyx b/tests/compile/extindex.pyx index cc158543..a7b218ee 100644 --- a/tests/compile/extindex.pyx +++ b/tests/compile/extindex.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __index__(self): diff --git a/tests/compile/extinheritdel.pyx b/tests/compile/extinheritdel.pyx index c47670ea..ffdf2306 100644 --- a/tests/compile/extinheritdel.pyx +++ b/tests/compile/extinheritdel.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Parrot: pass diff --git a/tests/compile/extinheritset.pyx b/tests/compile/extinheritset.pyx index 17309f62..b15222cf 100644 --- a/tests/compile/extinheritset.pyx +++ b/tests/compile/extinheritset.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Parrot: pass diff --git a/tests/compile/extpropertyall.pyx b/tests/compile/extpropertyall.pyx index 4cfd9160..4739933f 100644 --- a/tests/compile/extpropertyall.pyx +++ b/tests/compile/extpropertyall.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: property eggs: diff --git a/tests/compile/extpropertydel.pyx b/tests/compile/extpropertydel.pyx index 27f943ca..e01ac0fe 100644 --- a/tests/compile/extpropertydel.pyx +++ b/tests/compile/extpropertydel.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: property eggs: diff --git a/tests/compile/extpropertydoc.pyx b/tests/compile/extpropertydoc.pyx index dd043e84..7082fe62 100644 --- a/tests/compile/extpropertydoc.pyx +++ b/tests/compile/extpropertydoc.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: property eggs: diff --git a/tests/compile/extpropertyget.pyx b/tests/compile/extpropertyget.pyx index c1a93885..d450b7bf 100644 --- a/tests/compile/extpropertyget.pyx +++ b/tests/compile/extpropertyget.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: property eggs: diff --git a/tests/compile/extpropertyset.pyx b/tests/compile/extpropertyset.pyx index 8c6e8510..69ea120f 100644 --- a/tests/compile/extpropertyset.pyx +++ b/tests/compile/extpropertyset.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: property eggs: diff --git a/tests/compile/extpymemberdef.pyx b/tests/compile/extpymemberdef.pyx index 61bf6d1b..fd7f68a0 100644 --- a/tests/compile/extpymemberdef.pyx +++ b/tests/compile/extpymemberdef.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: cdef public char c cdef public int i diff --git a/tests/compile/extsetattr.pyx b/tests/compile/extsetattr.pyx index 73f61eb9..0dade9b2 100644 --- a/tests/compile/extsetattr.pyx +++ b/tests/compile/extsetattr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __setattr__(self, n, x): diff --git a/tests/compile/extsetitem.pyx b/tests/compile/extsetitem.pyx index 7c426270..b94d8b7b 100644 --- a/tests/compile/extsetitem.pyx +++ b/tests/compile/extsetitem.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __setitem__(self, i, x): diff --git a/tests/compile/extsetslice.pyx b/tests/compile/extsetslice.pyx index 51b047e5..1141deb3 100644 --- a/tests/compile/extsetslice.pyx +++ b/tests/compile/extsetslice.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: def __setslice__(self, Py_ssize_t i, Py_ssize_t j, x): diff --git a/tests/compile/first_assignment.pyx b/tests/compile/first_assignment.pyx index 2bd74d02..729bbc56 100644 --- a/tests/compile/first_assignment.pyx +++ b/tests/compile/first_assignment.pyx @@ -1,3 +1,4 @@ +# mode: compile cimport cython diff --git a/tests/compile/for.pyx b/tests/compile/for.pyx index ec9eab89..dbbdd4c4 100644 --- a/tests/compile/for.pyx +++ b/tests/compile/for.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(a, b, c): cdef int i for a in b: diff --git a/tests/compile/forfromelse.pyx b/tests/compile/forfromelse.pyx index 3350320d..9da613a5 100644 --- a/tests/compile/forfromelse.pyx +++ b/tests/compile/forfromelse.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void spam(): cdef int i, j=0, k=0 for i from 0 <= i < 10: diff --git a/tests/compile/formfeed.pyx b/tests/compile/formfeed.pyx index a5a41b29..3dbf7d40 100644 --- a/tests/compile/formfeed.pyx +++ b/tests/compile/formfeed.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int x x = 42 diff --git a/tests/compile/fromimport.pyx b/tests/compile/fromimport.pyx index e2a9e593..142999de 100644 --- a/tests/compile/fromimport.pyx +++ b/tests/compile/fromimport.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(): from spam import eggs from spam.morespam import bacon, eggs, ham diff --git a/tests/compile/funcptr.pyx b/tests/compile/funcptr.pyx index 64fa2908..50423835 100644 --- a/tests/compile/funcptr.pyx +++ b/tests/compile/funcptr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int grail(): cdef int (*spam)() spam = &grail diff --git a/tests/compile/gencall.pyx b/tests/compile/gencall.pyx index 06030cbb..a92b45a6 100644 --- a/tests/compile/gencall.pyx +++ b/tests/compile/gencall.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(x, y): x = y diff --git a/tests/compile/globalonly.pyx b/tests/compile/globalonly.pyx index 09444b08..97f739a4 100644 --- a/tests/compile/globalonly.pyx +++ b/tests/compile/globalonly.pyx @@ -1,3 +1,5 @@ +# mode: compile + global __name__ print __name__ diff --git a/tests/compile/globalstmt.pyx b/tests/compile/globalstmt.pyx index b0e84ee8..3a43c812 100644 --- a/tests/compile/globalstmt.pyx +++ b/tests/compile/globalstmt.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(): global a,b,c,d a = b diff --git a/tests/compile/globvardef.pyx b/tests/compile/globvardef.pyx index 9349016a..3c782b39 100644 --- a/tests/compile/globvardef.pyx +++ b/tests/compile/globvardef.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int a_global_int cdef a_global_pyobject diff --git a/tests/compile/gustafsson2.pyx b/tests/compile/gustafsson2.pyx index c4c38f99..f3a7f29a 100644 --- a/tests/compile/gustafsson2.pyx +++ b/tests/compile/gustafsson2.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef enum someenum_t: ENUMVALUE_1 ENUMVALUE_2 diff --git a/tests/compile/hinsen2.pyx b/tests/compile/hinsen2.pyx index 390fe2b1..86e2c4cf 100644 --- a/tests/compile/hinsen2.pyx +++ b/tests/compile/hinsen2.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class vector: def __div__(vector self, double factor): cdef object result = vector() diff --git a/tests/compile/huss2.pyx b/tests/compile/huss2.pyx index 92e2d475..b93bd5ab 100644 --- a/tests/compile/huss2.pyx +++ b/tests/compile/huss2.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef enum Color: red white diff --git a/tests/compile/ia_cdefblock.pyx b/tests/compile/ia_cdefblock.pyx index 57ecfcca..3409e3b0 100644 --- a/tests/compile/ia_cdefblock.pyx +++ b/tests/compile/ia_cdefblock.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef: struct PrivFoo: diff --git a/tests/compile/import.pyx b/tests/compile/import.pyx index 5b677300..47e9d4ac 100644 --- a/tests/compile/import.pyx +++ b/tests/compile/import.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(): import spam import spam.eggs diff --git a/tests/compile/index.pyx b/tests/compile/index.pyx index 38cdde60..179b7094 100644 --- a/tests/compile/index.pyx +++ b/tests/compile/index.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(obj1, obj2, obj3): cdef int int1, int2=0, int3=0 cdef float flt1, *ptr1=NULL diff --git a/tests/compile/indices.pyx b/tests/compile/indices.pyx index 6daab50d..64c28bd7 100644 --- a/tests/compile/indices.pyx +++ b/tests/compile/indices.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef int* a cdef object x diff --git a/tests/compile/ishimoto1.pyx b/tests/compile/ishimoto1.pyx index 4cf478c9..80a55da0 100644 --- a/tests/compile/ishimoto1.pyx +++ b/tests/compile/ishimoto1.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class A: def __getitem__(self, x): diff --git a/tests/compile/ishimoto4.pyx b/tests/compile/ishimoto4.pyx index c6bd0df9..4c1ff841 100644 --- a/tests/compile/ishimoto4.pyx +++ b/tests/compile/ishimoto4.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void __stdcall f(): pass diff --git a/tests/compile/jiba3.pyx b/tests/compile/jiba3.pyx index e550ba73..ca131da2 100644 --- a/tests/compile/jiba3.pyx +++ b/tests/compile/jiba3.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Position cdef class Point(Position) cdef class Vector(Point) diff --git a/tests/compile/jiba4.pyx b/tests/compile/jiba4.pyx index 46fcf776..0ad9462a 100644 --- a/tests/compile/jiba4.pyx +++ b/tests/compile/jiba4.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef class A: cdef object x diff --git a/tests/compile/jiba5.pyx b/tests/compile/jiba5.pyx index 9a4063f3..a3a7beb6 100644 --- a/tests/compile/jiba5.pyx +++ b/tests/compile/jiba5.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(): cdef int i=0 global mylist diff --git a/tests/compile/jiba6.pyx b/tests/compile/jiba6.pyx index 5470fa07..efa52a70 100644 --- a/tests/compile/jiba6.pyx +++ b/tests/compile/jiba6.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "string.h": void memcpy(void* des, void* src, int size) diff --git a/tests/compile/johnson1.pyx b/tests/compile/johnson1.pyx index 4b08d22a..122268b4 100644 --- a/tests/compile/johnson1.pyx +++ b/tests/compile/johnson1.pyx @@ -1,3 +1,5 @@ +# mode: compile + ctypedef enum foo: FOO diff --git a/tests/compile/johnson2.pyx b/tests/compile/johnson2.pyx index a767afbb..6297138f 100644 --- a/tests/compile/johnson2.pyx +++ b/tests/compile/johnson2.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class C: cdef object foo diff --git a/tests/compile/khavkine1.pyx b/tests/compile/khavkine1.pyx index dce5edbb..32d89f94 100644 --- a/tests/compile/khavkine1.pyx +++ b/tests/compile/khavkine1.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class T: cdef int a[1] diff --git a/tests/compile/kleckner1.pyx b/tests/compile/kleckner1.pyx index eb8aa28e..81051523 100644 --- a/tests/compile/kleckner1.pyx +++ b/tests/compile/kleckner1.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(x,): pass diff --git a/tests/compile/lepage_2.pyx b/tests/compile/lepage_2.pyx index 79fda814..9cb35f47 100644 --- a/tests/compile/lepage_2.pyx +++ b/tests/compile/lepage_2.pyx @@ -1,2 +1,4 @@ +# mode: compile + ctypedef struct BB: void (*f) (void* state) diff --git a/tests/compile/libc_all.pyx b/tests/compile/libc_all.pyx index be428a40..cfe765ce 100644 --- a/tests/compile/libc_all.pyx +++ b/tests/compile/libc_all.pyx @@ -1,3 +1,5 @@ +# mode: compile + cimport libc cimport libc.stdio diff --git a/tests/compile/libc_errno.pyx b/tests/compile/libc_errno.pyx index 07d4df97..66631647 100644 --- a/tests/compile/libc_errno.pyx +++ b/tests/compile/libc_errno.pyx @@ -1,3 +1,5 @@ +# mode: compile + from libc.errno cimport * if errno == EDOM : pass diff --git a/tests/compile/libc_math.pyx b/tests/compile/libc_math.pyx index 08e59907..ff5632f3 100644 --- a/tests/compile/libc_math.pyx +++ b/tests/compile/libc_math.pyx @@ -1,3 +1,5 @@ +# mode: compile + from libc.math cimport (M_E, M_LOG2E, M_LOG10E, M_LN2, M_LN10, M_PI, M_PI_2, M_PI_4, M_1_PI, M_2_PI, M_2_SQRTPI, M_SQRT2, M_SQRT1_2) from libc.math cimport (acos, asin, atan, atan2, cos, sin, tan, cosh, sinh, diff --git a/tests/compile/libc_signal.pyx b/tests/compile/libc_signal.pyx index 4e162c19..ee8921fc 100644 --- a/tests/compile/libc_signal.pyx +++ b/tests/compile/libc_signal.pyx @@ -1,3 +1,5 @@ +# mode: compile + from libc.signal cimport * cdef void sighdl(int signum) nogil: diff --git a/tests/compile/longunsigned.pyx b/tests/compile/longunsigned.pyx index 17e9ee24..8d696d1c 100644 --- a/tests/compile/longunsigned.pyx +++ b/tests/compile/longunsigned.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef extern unsigned long x cdef extern long unsigned y diff --git a/tests/compile/magcmp.pyx b/tests/compile/magcmp.pyx index 8f81edc2..665f0937 100644 --- a/tests/compile/magcmp.pyx +++ b/tests/compile/magcmp.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void foo(): cdef int bool, int1=0, int2=0 bool = int1 < int2 diff --git a/tests/compile/msvc_strings.pyx b/tests/compile/msvc_strings.pyx index 5887ff31..f3079c38 100644 --- a/tests/compile/msvc_strings.pyx +++ b/tests/compile/msvc_strings.pyx @@ -1,3 +1,5 @@ +# mode: compile + """A long module docstring. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sit amet diff --git a/tests/compile/nogil.pyx b/tests/compile/nogil.pyx index 213ae60e..0da96047 100644 --- a/tests/compile/nogil.pyx +++ b/tests/compile/nogil.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern object g(object x) nogil cdef extern void g2(object x) nogil diff --git a/tests/compile/nonctypedefclass.pyx b/tests/compile/nonctypedefclass.pyx index abbbe4d2..514b7e31 100644 --- a/tests/compile/nonctypedefclass.pyx +++ b/tests/compile/nonctypedefclass.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class spam: pass diff --git a/tests/compile/none.pyx b/tests/compile/none.pyx index 2d51c5ca..b83bc75b 100644 --- a/tests/compile/none.pyx +++ b/tests/compile/none.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void spam(): eggs = None diff --git a/tests/compile/notnonearg.pyx b/tests/compile/notnonearg.pyx index 711cf9e0..c974a234 100644 --- a/tests/compile/notnonearg.pyx +++ b/tests/compile/notnonearg.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern class external.Spam [object Spam]: pass cdef extern class external.Eggs [object Eggs]: pass diff --git a/tests/compile/nullptr.pyx b/tests/compile/nullptr.pyx index fe4b96b2..35b42d83 100644 --- a/tests/compile/nullptr.pyx +++ b/tests/compile/nullptr.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef char *p1 cdef int *p2 cdef int x diff --git a/tests/compile/omittedargnames.pyx b/tests/compile/omittedargnames.pyx index 85fe92a1..3c7fa99b 100644 --- a/tests/compile/omittedargnames.pyx +++ b/tests/compile/omittedargnames.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef extern void spam(int, char *) diff --git a/tests/compile/pinard4.pyx b/tests/compile/pinard4.pyx index dfdd3179..8f321839 100644 --- a/tests/compile/pinard4.pyx +++ b/tests/compile/pinard4.pyx @@ -1,3 +1,5 @@ +# mode: compile + __doc__ = u""" >>> fiches_CP [] diff --git a/tests/compile/posix_pxds.pyx b/tests/compile/posix_pxds.pyx index 4a6995f6..8b0fd437 100644 --- a/tests/compile/posix_pxds.pyx +++ b/tests/compile/posix_pxds.pyx @@ -1,3 +1,5 @@ +# mode: compile + cimport posix cimport posix.unistd diff --git a/tests/compile/publicapi_api.pyx b/tests/compile/publicapi_api.pyx index e65e47a3..ddf520de 100644 --- a/tests/compile/publicapi_api.pyx +++ b/tests/compile/publicapi_api.pyx @@ -1,3 +1,4 @@ +# mode: compile # -- ctypedef int Int0 diff --git a/tests/compile/publicapi_mix.pyx b/tests/compile/publicapi_mix.pyx index 93bd29e2..8936dc8c 100644 --- a/tests/compile/publicapi_mix.pyx +++ b/tests/compile/publicapi_mix.pyx @@ -1,3 +1,4 @@ +# mode: compile # -- ctypedef int Int0 diff --git a/tests/compile/publicapi_pub.pyx b/tests/compile/publicapi_pub.pyx index 2ff473af..ee93841c 100644 --- a/tests/compile/publicapi_pub.pyx +++ b/tests/compile/publicapi_pub.pyx @@ -1,3 +1,4 @@ +# mode: compile # -- ctypedef int Int0 diff --git a/tests/compile/publicapi_pxd_mix.pyx b/tests/compile/publicapi_pxd_mix.pyx index 242743ff..d3881d10 100644 --- a/tests/compile/publicapi_pxd_mix.pyx +++ b/tests/compile/publicapi_pxd_mix.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Foo1: pass cdef class Foo2: pass cdef class Foo3: pass diff --git a/tests/compile/pxd_override_T230.py b/tests/compile/pxd_override_T230.py index b0f1bfe4..463f81cf 100644 --- a/tests/compile/pxd_override_T230.py +++ b/tests/compile/pxd_override_T230.py @@ -1,3 +1,5 @@ +# mode: compile + class A: def foo(self): return "A" diff --git a/tests/compile/pyclass.pyx b/tests/compile/pyclass.pyx index c7974d2a..26b75570 100644 --- a/tests/compile/pyclass.pyx +++ b/tests/compile/pyclass.pyx @@ -1,3 +1,5 @@ +# mode: compile + class Spam: def eggs(self): diff --git a/tests/compile/pylong.pyx b/tests/compile/pylong.pyx index a6c537c4..f4938fab 100644 --- a/tests/compile/pylong.pyx +++ b/tests/compile/pylong.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef extern from "Python.h": ctypedef struct PyTypeObject: pass diff --git a/tests/compile/r_pernici1.pyx b/tests/compile/r_pernici1.pyx index 6425c3c7..5548d60b 100644 --- a/tests/compile/r_pernici1.pyx +++ b/tests/compile/r_pernici1.pyx @@ -1,3 +1,5 @@ +# mode: compile + __doc__ = u""" >>> main() 3.14159265358979323846 diff --git a/tests/compile/signedtypes.pyx b/tests/compile/signedtypes.pyx index 6ca99969..d897ac3d 100644 --- a/tests/compile/signedtypes.pyx +++ b/tests/compile/signedtypes.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef struct S: char c unsigned char uc diff --git a/tests/compile/slicex.pyx b/tests/compile/slicex.pyx index b18620b2..045d612f 100644 --- a/tests/compile/slicex.pyx +++ b/tests/compile/slicex.pyx @@ -1,2 +1,4 @@ +# mode: compile + def f(a, b, c, d, e, f, g, h, i): a = b[c:d, e:f:g, ..., h, :i:] diff --git a/tests/compile/specialfloatvals.pyx b/tests/compile/specialfloatvals.pyx index 1575e1f3..6ed5b9ef 100644 --- a/tests/compile/specialfloatvals.pyx +++ b/tests/compile/specialfloatvals.pyx @@ -1,3 +1,5 @@ +# mode: compile + DEF nan = float('nan') DEF inf = float('inf') DEF minf = -float('inf') diff --git a/tests/compile/specmethargdefault.pyx b/tests/compile/specmethargdefault.pyx index fa0c5cf5..468ee837 100644 --- a/tests/compile/specmethargdefault.pyx +++ b/tests/compile/specmethargdefault.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Grail: def __cinit__(self, spam = None): diff --git a/tests/compile/specmethdocstring.pyx b/tests/compile/specmethdocstring.pyx index b28875a8..cacff950 100644 --- a/tests/compile/specmethdocstring.pyx +++ b/tests/compile/specmethdocstring.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class C: def __cinit__(self): "This is an unusable docstring." diff --git a/tests/compile/specmethextarg.pyx b/tests/compile/specmethextarg.pyx index ab1f7e91..3105e213 100644 --- a/tests/compile/specmethextarg.pyx +++ b/tests/compile/specmethextarg.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef class Spam: cdef int eggs diff --git a/tests/compile/traceback.pyx b/tests/compile/traceback.pyx index 9edfc72d..04cecaf4 100644 --- a/tests/compile/traceback.pyx +++ b/tests/compile/traceback.pyx @@ -1,3 +1,5 @@ +# mode: compile + def spam(): raise Exception diff --git a/tests/compile/tryexcept.pyx b/tests/compile/tryexcept.pyx index fcfe83ce..85788bf4 100644 --- a/tests/compile/tryexcept.pyx +++ b/tests/compile/tryexcept.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(a, b, c, x): cdef int i a = b + c diff --git a/tests/compile/tryfinally.pyx b/tests/compile/tryfinally.pyx index 4528607a..c6f4e2ed 100644 --- a/tests/compile/tryfinally.pyx +++ b/tests/compile/tryfinally.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(a, b, c, x): cdef int i a = b + c diff --git a/tests/compile/typecast.pyx b/tests/compile/typecast.pyx index f56a9be8..a72cf3ce 100644 --- a/tests/compile/typecast.pyx +++ b/tests/compile/typecast.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f(obj): cdef size_t i=0 cdef char *p diff --git a/tests/compile/types_and_names.pyx b/tests/compile/types_and_names.pyx index e24bb0f1..8ded94e4 100644 --- a/tests/compile/types_and_names.pyx +++ b/tests/compile/types_and_names.pyx @@ -1,3 +1,5 @@ +# mode: compile + print sizeof(point*) cdef foo(int i0, int i, list L0, list L, point p0, point p, point* ps): diff --git a/tests/compile/watts2.pyx b/tests/compile/watts2.pyx index f1f14d88..a14e8c27 100644 --- a/tests/compile/watts2.pyx +++ b/tests/compile/watts2.pyx @@ -1,2 +1,4 @@ +# mode: compile + cdef int x x = 0xFFFFFFFF diff --git a/tests/compile/weakref_T276.pyx b/tests/compile/weakref_T276.pyx index 21007618..d56f6730 100644 --- a/tests/compile/weakref_T276.pyx +++ b/tests/compile/weakref_T276.pyx @@ -1,3 +1,6 @@ +# ticket: 276 +# mode: compile + __doc__ = u""" """ diff --git a/tests/compile/while.pyx b/tests/compile/while.pyx index 439cb3d2..2ca65742 100644 --- a/tests/compile/while.pyx +++ b/tests/compile/while.pyx @@ -1,3 +1,5 @@ +# mode: compile + def f(a, b): cdef int i = 5 diff --git a/tests/compile/withgil.pyx b/tests/compile/withgil.pyx index fa77d6ed..19bf69f6 100644 --- a/tests/compile/withgil.pyx +++ b/tests/compile/withgil.pyx @@ -1,3 +1,5 @@ +# mode: compile + cdef void f() with gil: x = 42 diff --git a/tests/errors/break_outside_loop.pyx b/tests/errors/break_outside_loop.pyx index c2814423..0f635b6d 100644 --- a/tests/errors/break_outside_loop.pyx +++ b/tests/errors/break_outside_loop.pyx @@ -1,3 +1,4 @@ +# mode: error break diff --git a/tests/errors/buffertypedef_T117.pyx b/tests/errors/buffertypedef_T117.pyx index 21878a4f..e3592185 100644 --- a/tests/errors/buffertypedef_T117.pyx +++ b/tests/errors/buffertypedef_T117.pyx @@ -1,3 +1,6 @@ +# ticket: 117 +# mode: error + ctypedef object[float] mybuffer _ERRORS = u""" diff --git a/tests/errors/builtin_type_inheritance.pyx b/tests/errors/builtin_type_inheritance.pyx index 79ff24a5..bce347ae 100644 --- a/tests/errors/builtin_type_inheritance.pyx +++ b/tests/errors/builtin_type_inheritance.pyx @@ -1,3 +1,4 @@ +# mode: error # current restriction: cannot inherit from PyVarObject (see ticket #152) diff --git a/tests/errors/callargs.pyx b/tests/errors/callargs.pyx index e9c1b369..c0970da3 100644 --- a/tests/errors/callargs.pyx +++ b/tests/errors/callargs.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(*args, **kwargs): pass diff --git a/tests/errors/callingnonexisting_T307.pyx b/tests/errors/callingnonexisting_T307.pyx index b66f6464..e1806421 100644 --- a/tests/errors/callingnonexisting_T307.pyx +++ b/tests/errors/callingnonexisting_T307.pyx @@ -1,3 +1,6 @@ +# ticket: 307 +# mode: error + nonexisting(3, with_kw_arg=4) _ERRORS = u""" diff --git a/tests/errors/cdef_members_T517.pyx b/tests/errors/cdef_members_T517.pyx index ee95a408..a19f8aaa 100644 --- a/tests/errors/cdef_members_T517.pyx +++ b/tests/errors/cdef_members_T517.pyx @@ -1,3 +1,6 @@ +# ticket: 517 +# mode: error + ctypedef void* VoidP cdef class Spam: diff --git a/tests/errors/cdef_syntax.pyx b/tests/errors/cdef_syntax.pyx index 0af66101..a59251e1 100644 --- a/tests/errors/cdef_syntax.pyx +++ b/tests/errors/cdef_syntax.pyx @@ -1,3 +1,4 @@ +# mode: error cdef pass cdef void diff --git a/tests/errors/cdefkwargs.pyx b/tests/errors/cdefkwargs.pyx index d0d3385c..a4477e2d 100644 --- a/tests/errors/cdefkwargs.pyx +++ b/tests/errors/cdefkwargs.pyx @@ -1,3 +1,5 @@ +# mode: error + __doc__ = u""" >>> call2() >>> call3() diff --git a/tests/errors/cdefoptargs.pyx b/tests/errors/cdefoptargs.pyx index 858c7fd9..b58aebad 100644 --- a/tests/errors/cdefoptargs.pyx +++ b/tests/errors/cdefoptargs.pyx @@ -1,3 +1,5 @@ +# mode: error + def call5(): b(1,2,3,4,5) diff --git a/tests/errors/cdefspecial.pyx b/tests/errors/cdefspecial.pyx index 53a484ea..3ae588d6 100644 --- a/tests/errors/cdefspecial.pyx +++ b/tests/errors/cdefspecial.pyx @@ -1,3 +1,4 @@ +# mode: error cdef class Test: cdef __cinit__(self): diff --git a/tests/errors/cmethbasematch.pyx b/tests/errors/cmethbasematch.pyx index b0b1222e..6c206ae0 100644 --- a/tests/errors/cmethbasematch.pyx +++ b/tests/errors/cmethbasematch.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class C: cdef void f(self): pass diff --git a/tests/errors/compile_time_unraisable_T370.pyx b/tests/errors/compile_time_unraisable_T370.pyx index 6a6c903d..963f280f 100644 --- a/tests/errors/compile_time_unraisable_T370.pyx +++ b/tests/errors/compile_time_unraisable_T370.pyx @@ -1,3 +1,5 @@ +# ticket: 370 +# mode: error cdef int raiseit(): raise IndexError diff --git a/tests/errors/continue_outside_loop.pyx b/tests/errors/continue_outside_loop.pyx index f8309158..a3ed7d77 100644 --- a/tests/errors/continue_outside_loop.pyx +++ b/tests/errors/continue_outside_loop.pyx @@ -1,3 +1,4 @@ +# mode: error continue diff --git a/tests/errors/cpdef_syntax.pyx b/tests/errors/cpdef_syntax.pyx index 654a1fe0..fe89260b 100644 --- a/tests/errors/cpdef_syntax.pyx +++ b/tests/errors/cpdef_syntax.pyx @@ -1,3 +1,4 @@ +# mode: error cpdef nogil: pass cpdef nogil class test: pass diff --git a/tests/errors/cpp_no_constructor.pyx b/tests/errors/cpp_no_constructor.pyx index de752478..f7d933ee 100644 --- a/tests/errors/cpp_no_constructor.pyx +++ b/tests/errors/cpp_no_constructor.pyx @@ -1,3 +1,6 @@ +# tag: cpp +# mode: error + cdef extern from *: cdef cppclass Foo: Foo() diff --git a/tests/errors/cython3_bytes.pyx b/tests/errors/cython3_bytes.pyx index a8ad4f66..768e8b16 100644 --- a/tests/errors/cython3_bytes.pyx +++ b/tests/errors/cython3_bytes.pyx @@ -1,3 +1,4 @@ +# mode: error # -*- coding: utf-8 -*- # cython: language_level=3 diff --git a/tests/errors/declareafteruse_T158.pyx b/tests/errors/declareafteruse_T158.pyx index de75ce62..e5bfbce5 100644 --- a/tests/errors/declareafteruse_T158.pyx +++ b/tests/errors/declareafteruse_T158.pyx @@ -1,3 +1,6 @@ +# ticket: 158 +# mode: error + def mult_decl_test(): print "%s" % vv print "%s" % s diff --git a/tests/errors/def_nogil.pyx b/tests/errors/def_nogil.pyx index 85cf3c73..f9092d41 100644 --- a/tests/errors/def_nogil.pyx +++ b/tests/errors/def_nogil.pyx @@ -1,3 +1,4 @@ +# mode: error def test() nogil: pass diff --git a/tests/errors/e2_packedstruct_T290.pyx b/tests/errors/e2_packedstruct_T290.pyx index d5628772..12a3ff95 100644 --- a/tests/errors/e2_packedstruct_T290.pyx +++ b/tests/errors/e2_packedstruct_T290.pyx @@ -1,3 +1,6 @@ +# ticket: 290 +# mode: error + cdef packed foo: pass diff --git a/tests/errors/e_addop.pyx b/tests/errors/e_addop.pyx index 2edae592..e8b5aa14 100644 --- a/tests/errors/e_addop.pyx +++ b/tests/errors/e_addop.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef int int1, int3 cdef int *ptr1, *ptr2, *ptr3 diff --git a/tests/errors/e_argdefault.pyx b/tests/errors/e_argdefault.pyx index 70c472dd..94a2f454 100644 --- a/tests/errors/e_argdefault.pyx +++ b/tests/errors/e_argdefault.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef spam(int i, char *s = "blarg", float f): # can't have default value pass diff --git a/tests/errors/e_ass.pyx b/tests/errors/e_ass.pyx index 0d1a0a4a..ce5b8a7e 100644 --- a/tests/errors/e_ass.pyx +++ b/tests/errors/e_ass.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef void foo(obj): cdef int i1 cdef char *p1 diff --git a/tests/errors/e_assnone.pyx b/tests/errors/e_assnone.pyx index 83015cea..f0704ba4 100644 --- a/tests/errors/e_assnone.pyx +++ b/tests/errors/e_assnone.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef void spam(): None = 42 _ERRORS = u""" diff --git a/tests/errors/e_autotestdict.pyx b/tests/errors/e_autotestdict.pyx index 17f12362..44ac57db 100644 --- a/tests/errors/e_autotestdict.pyx +++ b/tests/errors/e_autotestdict.pyx @@ -1,3 +1,5 @@ +# mode: error + cimport cython @cython.autotestdict(False) diff --git a/tests/errors/e_badexcvaltype.pyx b/tests/errors/e_badexcvaltype.pyx index b14a7ec5..7778cb03 100644 --- a/tests/errors/e_badexcvaltype.pyx +++ b/tests/errors/e_badexcvaltype.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef char *spam() except -1: pass diff --git a/tests/errors/e_badfuncargtype.pyx b/tests/errors/e_badfuncargtype.pyx index 5e23d303..e6c37439 100644 --- a/tests/errors/e_badfuncargtype.pyx +++ b/tests/errors/e_badfuncargtype.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct Spam cdef extern int spam(void) # function argument cannot be void diff --git a/tests/errors/e_badpyparam.pyx b/tests/errors/e_badpyparam.pyx index 38b4b2bc..401e87f9 100644 --- a/tests/errors/e_badpyparam.pyx +++ b/tests/errors/e_badpyparam.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct Foo def f(Foo *p): diff --git a/tests/errors/e_badtypeuse.pyx b/tests/errors/e_badtypeuse.pyx index 70c4166f..028bf1bf 100644 --- a/tests/errors/e_badtypeuse.pyx +++ b/tests/errors/e_badtypeuse.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct Grail cdef extern object xobj # Python object cannot be extern diff --git a/tests/errors/e_bitop.pyx b/tests/errors/e_bitop.pyx index 1547c8b5..01addd6e 100644 --- a/tests/errors/e_bitop.pyx +++ b/tests/errors/e_bitop.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef int int1, int2 cdef char *ptr diff --git a/tests/errors/e_boolcoerce.pyx b/tests/errors/e_boolcoerce.pyx index 2be2d0a7..ea732254 100644 --- a/tests/errors/e_boolcoerce.pyx +++ b/tests/errors/e_boolcoerce.pyx @@ -1,3 +1,5 @@ +# mode: error + ctypedef struct struct_type_not_boolean: int i float f diff --git a/tests/errors/e_bufaccess.pyx b/tests/errors/e_bufaccess.pyx index f93d1107..8caabd17 100644 --- a/tests/errors/e_bufaccess.pyx +++ b/tests/errors/e_bufaccess.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef object[int] buf cdef class A: cdef object[int] buf diff --git a/tests/errors/e_bufaccess2.pyx b/tests/errors/e_bufaccess2.pyx index 24fc68a3..e754a258 100644 --- a/tests/errors/e_bufaccess2.pyx +++ b/tests/errors/e_bufaccess2.pyx @@ -1,3 +1,5 @@ +# mode: error + cimport e_bufaccess_pxd # was needed to provoke a bug involving ErrorType import cython diff --git a/tests/errors/e_callnonfunction.pyx b/tests/errors/e_callnonfunction.pyx index 0f4c19ef..50c8cc84 100644 --- a/tests/errors/e_callnonfunction.pyx +++ b/tests/errors/e_callnonfunction.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef int i i() diff --git a/tests/errors/e_callspec.pyx b/tests/errors/e_callspec.pyx index b4cd0409..ed95fe13 100644 --- a/tests/errors/e_callspec.pyx +++ b/tests/errors/e_callspec.pyx @@ -1,3 +1,5 @@ +# mode: error + cimport cython @cython.callspec("") diff --git a/tests/errors/e_cdef_keywords_T241.pyx b/tests/errors/e_cdef_keywords_T241.pyx index e8289aaa..61667e87 100644 --- a/tests/errors/e_cdef_keywords_T241.pyx +++ b/tests/errors/e_cdef_keywords_T241.pyx @@ -1,3 +1,6 @@ +# ticket: 241 +# mode: error + cdef some_function(x, y): pass diff --git a/tests/errors/e_cdef_missing_declarator.pyx b/tests/errors/e_cdef_missing_declarator.pyx index 0b303fbe..70983d2b 100644 --- a/tests/errors/e_cdef_missing_declarator.pyx +++ b/tests/errors/e_cdef_missing_declarator.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef int cdef extern from *: diff --git a/tests/errors/e_cdefassign.pyx b/tests/errors/e_cdefassign.pyx index f4a38fda..4bcaa5f9 100644 --- a/tests/errors/e_cdefassign.pyx +++ b/tests/errors/e_cdefassign.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class A: cdef int value = 3 diff --git a/tests/errors/e_cdefemptysue.pyx b/tests/errors/e_cdefemptysue.pyx index d71a8ab3..652bdbd8 100644 --- a/tests/errors/e_cdefemptysue.pyx +++ b/tests/errors/e_cdefemptysue.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct spam: pass diff --git a/tests/errors/e_cenum.pyx b/tests/errors/e_cenum.pyx index 70656e10..8915958a 100644 --- a/tests/errors/e_cenum.pyx +++ b/tests/errors/e_cenum.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef enum Spam: a, b, c diff --git a/tests/errors/e_cmethbasematch.pyx b/tests/errors/e_cmethbasematch.pyx index b434c82a..4a415317 100644 --- a/tests/errors/e_cmethbasematch.pyx +++ b/tests/errors/e_cmethbasematch.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class C: cdef void f(self): pass diff --git a/tests/errors/e_cmp.pyx b/tests/errors/e_cmp.pyx index 2ec33a58..6c7d5dca 100644 --- a/tests/errors/e_cmp.pyx +++ b/tests/errors/e_cmp.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef void foo(): cdef int bool, int1 cdef char *ptr2 diff --git a/tests/errors/e_cstruct.pyx b/tests/errors/e_cstruct.pyx index 3f7e9a6e..bd995bf3 100644 --- a/tests/errors/e_cstruct.pyx +++ b/tests/errors/e_cstruct.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct Spam: int i char c diff --git a/tests/errors/e_ctypedefforward.pyx b/tests/errors/e_ctypedefforward.pyx index f2358fd5..2936e5c8 100644 --- a/tests/errors/e_ctypedefforward.pyx +++ b/tests/errors/e_ctypedefforward.pyx @@ -1,3 +1,5 @@ +# mode: error + ctypedef struct Spam cdef extern from *: diff --git a/tests/errors/e_ctypedefornot.pyx b/tests/errors/e_ctypedefornot.pyx index 632ba780..25f2ab94 100644 --- a/tests/errors/e_ctypedefornot.pyx +++ b/tests/errors/e_ctypedefornot.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct Foo ctypedef struct Foo: diff --git a/tests/errors/e_declarations.pyx b/tests/errors/e_declarations.pyx index 388978d1..f749f1ce 100644 --- a/tests/errors/e_declarations.pyx +++ b/tests/errors/e_declarations.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef extern void fa[5]() cdef extern int af()[5] cdef extern int ff()() diff --git a/tests/errors/e_decorators.pyx b/tests/errors/e_decorators.pyx index 85d83c6e..5abc1fc2 100644 --- a/tests/errors/e_decorators.pyx +++ b/tests/errors/e_decorators.pyx @@ -1,3 +1,4 @@ +# mode: error _ERRORS = u""" 4:4 Expected a newline after decorator diff --git a/tests/errors/e_del.pyx b/tests/errors/e_del.pyx index 172bae73..72e6f1fb 100644 --- a/tests/errors/e_del.pyx +++ b/tests/errors/e_del.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct S: int m diff --git a/tests/errors/e_directives.pyx b/tests/errors/e_directives.pyx index f7f777ac..ad2aabae 100644 --- a/tests/errors/e_directives.pyx +++ b/tests/errors/e_directives.pyx @@ -1,3 +1,4 @@ +# mode: error # cython: nonexistant = True # cython: boundscheck = true diff --git a/tests/errors/e_exceptclause.pyx b/tests/errors/e_exceptclause.pyx index 0d997f86..25bac3de 100644 --- a/tests/errors/e_exceptclause.pyx +++ b/tests/errors/e_exceptclause.pyx @@ -1,3 +1,4 @@ +# mode: error try: raise KeyError diff --git a/tests/errors/e_excvalfunctype.pyx b/tests/errors/e_excvalfunctype.pyx index 44b8c050..8be36a50 100644 --- a/tests/errors/e_excvalfunctype.pyx +++ b/tests/errors/e_excvalfunctype.pyx @@ -1,3 +1,5 @@ +# mode: error + ctypedef int (*spamfunc)(int, char *) except 42 ctypedef int (*grailfunc)(int, char *) diff --git a/tests/errors/e_extweakref.pyx b/tests/errors/e_extweakref.pyx index 4b689969..185b25ca 100644 --- a/tests/errors/e_extweakref.pyx +++ b/tests/errors/e_extweakref.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class C: cdef object __weakref__ diff --git a/tests/errors/e_func_in_pxd.pyx b/tests/errors/e_func_in_pxd.pyx index e8a158c3..dd7ca017 100644 --- a/tests/errors/e_func_in_pxd.pyx +++ b/tests/errors/e_func_in_pxd.pyx @@ -1,3 +1,5 @@ +# mode: error + cimport e_func_in_pxd_support _ERRORS = u""" diff --git a/tests/errors/e_index.pyx b/tests/errors/e_index.pyx index 726d7856..423eb3b8 100644 --- a/tests/errors/e_index.pyx +++ b/tests/errors/e_index.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(obj1, obj2): cdef int int1, int2, int3 cdef float flt1, *ptr1 diff --git a/tests/errors/e_int_literals_py2.py b/tests/errors/e_int_literals_py2.py index 692d232b..f9924fa6 100644 --- a/tests/errors/e_int_literals_py2.py +++ b/tests/errors/e_int_literals_py2.py @@ -1,3 +1,4 @@ +# mode: error # cython: language_level=2 def int_literals(): diff --git a/tests/errors/e_int_literals_py3.py b/tests/errors/e_int_literals_py3.py index ead9dfdb..b5b49c3f 100644 --- a/tests/errors/e_int_literals_py3.py +++ b/tests/errors/e_int_literals_py3.py @@ -1,3 +1,4 @@ +# mode: error # cython: language_level=3 def int_literals(): diff --git a/tests/errors/e_multass.pyx b/tests/errors/e_multass.pyx index 68a552f8..1cd99113 100644 --- a/tests/errors/e_multass.pyx +++ b/tests/errors/e_multass.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(obj1a, obj1b): cdef int int1, int2, int3 cdef int *ptr2 diff --git a/tests/errors/e_nargs.pyx b/tests/errors/e_nargs.pyx index 81ba78fb..500772c7 100644 --- a/tests/errors/e_nargs.pyx +++ b/tests/errors/e_nargs.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef extern grail(char *s, int i) cdef extern spam(char *s, int i,...) diff --git a/tests/errors/e_nogilcmeth.pyx b/tests/errors/e_nogilcmeth.pyx index ec596524..6525292c 100644 --- a/tests/errors/e_nogilcmeth.pyx +++ b/tests/errors/e_nogilcmeth.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class C: cdef void f(self) nogil: pass diff --git a/tests/errors/e_nogilfunctype.pyx b/tests/errors/e_nogilfunctype.pyx index f45b4d4a..f2564750 100644 --- a/tests/errors/e_nogilfunctype.pyx +++ b/tests/errors/e_nogilfunctype.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef extern from *: cdef void f() cdef void (*fp)() nogil diff --git a/tests/errors/e_nosignword.pyx b/tests/errors/e_nosignword.pyx index 1931f467..7bb72a24 100644 --- a/tests/errors/e_nosignword.pyx +++ b/tests/errors/e_nosignword.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef signed float e cdef unsigned float f cdef signed double g diff --git a/tests/errors/e_notnone.pyx b/tests/errors/e_notnone.pyx index de6c294a..3d1e4bf4 100644 --- a/tests/errors/e_notnone.pyx +++ b/tests/errors/e_notnone.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef extern class Grail.Shrubbery cdef void spam(Shrubbery sh not None): diff --git a/tests/errors/e_notnone2.pyx b/tests/errors/e_notnone2.pyx index 8e2fe3ec..96440771 100644 --- a/tests/errors/e_notnone2.pyx +++ b/tests/errors/e_notnone2.pyx @@ -1,3 +1,5 @@ +# mode: error + def eggs(int x not None, char* y not None): pass _ERRORS = u""" diff --git a/tests/errors/e_numop.pyx b/tests/errors/e_numop.pyx index 60831cf7..0257b11d 100644 --- a/tests/errors/e_numop.pyx +++ b/tests/errors/e_numop.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef int int1, int2 cdef int *ptr diff --git a/tests/errors/e_packedstruct_T290.pyx b/tests/errors/e_packedstruct_T290.pyx index 408246c8..0ae8776e 100644 --- a/tests/errors/e_packedstruct_T290.pyx +++ b/tests/errors/e_packedstruct_T290.pyx @@ -1,3 +1,6 @@ +# ticket: 290 +# mode: error + cdef extern: cdef packed struct MyStruct: char a diff --git a/tests/errors/e_powop.pyx b/tests/errors/e_powop.pyx index 85ef57be..31b6f406 100644 --- a/tests/errors/e_powop.pyx +++ b/tests/errors/e_powop.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef char *str1 cdef float flt1, flt2, flt3 diff --git a/tests/errors/e_pxdimpl.pyx b/tests/errors/e_pxdimpl.pyx index bf110223..d405f1d0 100644 --- a/tests/errors/e_pxdimpl.pyx +++ b/tests/errors/e_pxdimpl.pyx @@ -1,3 +1,5 @@ +# mode: error + cimport e_pxdimpl_imported _ERRORS = u""" diff --git a/tests/errors/e_pyobinstruct.pyx b/tests/errors/e_pyobinstruct.pyx index a77ddf4a..7ec74006 100644 --- a/tests/errors/e_pyobinstruct.pyx +++ b/tests/errors/e_pyobinstruct.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef object x cdef struct spam: diff --git a/tests/errors/e_return.pyx b/tests/errors/e_return.pyx index e06f76ad..10713c76 100644 --- a/tests/errors/e_return.pyx +++ b/tests/errors/e_return.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef void g(): cdef int i return i # error diff --git a/tests/errors/e_sizeofincomplete.pyx b/tests/errors/e_sizeofincomplete.pyx index 3fc08583..b4ebe907 100644 --- a/tests/errors/e_sizeofincomplete.pyx +++ b/tests/errors/e_sizeofincomplete.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef struct unbekannt cdef int n n = sizeof(unbekannt) diff --git a/tests/errors/e_slice.pyx b/tests/errors/e_slice.pyx index 6deda6fb..ff692167 100644 --- a/tests/errors/e_slice.pyx +++ b/tests/errors/e_slice.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(obj2): cdef int *ptr1 obj1 = obj2[ptr1::] # error diff --git a/tests/errors/e_strcoerce.pyx b/tests/errors/e_strcoerce.pyx index fa491044..50d8a45d 100644 --- a/tests/errors/e_strcoerce.pyx +++ b/tests/errors/e_strcoerce.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef int c1 = "t" # works cdef int c2 = "te" # fails cdef int cx = "test" # fails diff --git a/tests/errors/e_subop.pyx b/tests/errors/e_subop.pyx index 90dfa72b..4dbe842a 100644 --- a/tests/errors/e_subop.pyx +++ b/tests/errors/e_subop.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef int int2 cdef char *ptr1, *ptr2, *ptr3 diff --git a/tests/errors/e_switch.pyx b/tests/errors/e_switch.pyx index f75d1782..342023dd 100644 --- a/tests/errors/e_switch.pyx +++ b/tests/errors/e_switch.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef int x = 3 if x == NONEXISTING: diff --git a/tests/errors/e_tempcast.pyx b/tests/errors/e_tempcast.pyx index d334f16d..a68b688a 100644 --- a/tests/errors/e_tempcast.pyx +++ b/tests/errors/e_tempcast.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef object blarg def foo(obj): diff --git a/tests/errors/e_undefexttype.pyx b/tests/errors/e_undefexttype.pyx index 23b7903a..56e76c57 100644 --- a/tests/errors/e_undefexttype.pyx +++ b/tests/errors/e_undefexttype.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class Spam cdef extern class external.Eggs _ERRORS = u""" diff --git a/tests/errors/e_unop.pyx b/tests/errors/e_unop.pyx index 994f1f36..23d2cd9c 100644 --- a/tests/errors/e_unop.pyx +++ b/tests/errors/e_unop.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef int int1 cdef char *str2 diff --git a/tests/errors/e_while.pyx b/tests/errors/e_while.pyx index 5a5d5c19..b35c069f 100644 --- a/tests/errors/e_while.pyx +++ b/tests/errors/e_while.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(a, b): cdef int i break # error diff --git a/tests/errors/empty.pyx b/tests/errors/empty.pyx index e69de29b..4260cdc7 100644 --- a/tests/errors/empty.pyx +++ b/tests/errors/empty.pyx @@ -0,0 +1 @@ +# mode: error diff --git a/tests/errors/encoding.pyx b/tests/errors/encoding.pyx index 39fcdf61..f7e4a557 100644 --- a/tests/errors/encoding.pyx +++ b/tests/errors/encoding.pyx @@ -1,3 +1,4 @@ +# mode: error # coding=ASCII """ diff --git a/tests/errors/extclassattrsetting.pyx b/tests/errors/extclassattrsetting.pyx index bc6cc93e..bab7b9e2 100644 --- a/tests/errors/extclassattrsetting.pyx +++ b/tests/errors/extclassattrsetting.pyx @@ -1,3 +1,5 @@ +# mode: error + __doc__ = u""" >>> e = ExtClass() >>> e.get() diff --git a/tests/errors/extended_unpacking.pyx b/tests/errors/extended_unpacking.pyx index bdcb69df..0ff3a61e 100644 --- a/tests/errors/extended_unpacking.pyx +++ b/tests/errors/extended_unpacking.pyx @@ -1,3 +1,4 @@ +# mode: error # invalid syntax (not handled by the parser) diff --git a/tests/errors/extended_unpacking_parser.pyx b/tests/errors/extended_unpacking_parser.pyx index 874985a9..5546de1a 100644 --- a/tests/errors/extended_unpacking_parser.pyx +++ b/tests/errors/extended_unpacking_parser.pyx @@ -1,3 +1,4 @@ +# mode: error # wrong size RHS (as handled by the parser) diff --git a/tests/errors/extended_unpacking_parser2.pyx b/tests/errors/extended_unpacking_parser2.pyx index 62770931..fe076b74 100644 --- a/tests/errors/extended_unpacking_parser2.pyx +++ b/tests/errors/extended_unpacking_parser2.pyx @@ -1,3 +1,4 @@ +# mode: error # invalid syntax (as handled by the parser) diff --git a/tests/errors/futurebraces.pyx b/tests/errors/futurebraces.pyx index 850036bb..5a72e6f6 100644 --- a/tests/errors/futurebraces.pyx +++ b/tests/errors/futurebraces.pyx @@ -1,3 +1,5 @@ +# mode: error + from __future__ import braces _ERRORS = u""" diff --git a/tests/errors/invalid_cast.pyx b/tests/errors/invalid_cast.pyx index 3bce8b02..05cd0b99 100644 --- a/tests/errors/invalid_cast.pyx +++ b/tests/errors/invalid_cast.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): a = True diff --git a/tests/errors/invalid_hex_escape0.pyx b/tests/errors/invalid_hex_escape0.pyx index ea5fb925..a80d6a5b 100644 --- a/tests/errors/invalid_hex_escape0.pyx +++ b/tests/errors/invalid_hex_escape0.pyx @@ -1,3 +1,4 @@ +# mode: error '\x' diff --git a/tests/errors/invalid_hex_escape1.pyx b/tests/errors/invalid_hex_escape1.pyx index 3e47eff8..80593542 100644 --- a/tests/errors/invalid_hex_escape1.pyx +++ b/tests/errors/invalid_hex_escape1.pyx @@ -1,3 +1,4 @@ +# mode: error '\x1' diff --git a/tests/errors/invalid_uescape.pyx b/tests/errors/invalid_uescape.pyx index a2036659..e358594b 100644 --- a/tests/errors/invalid_uescape.pyx +++ b/tests/errors/invalid_uescape.pyx @@ -1,3 +1,4 @@ +# mode: error u'\uXYZ' diff --git a/tests/errors/invalid_uescape0.pyx b/tests/errors/invalid_uescape0.pyx index 93d87ae0..06c2fc40 100644 --- a/tests/errors/invalid_uescape0.pyx +++ b/tests/errors/invalid_uescape0.pyx @@ -1,3 +1,4 @@ +# mode: error u'\u' diff --git a/tests/errors/invalid_uescape2.pyx b/tests/errors/invalid_uescape2.pyx index e98e0ce9..59328f69 100644 --- a/tests/errors/invalid_uescape2.pyx +++ b/tests/errors/invalid_uescape2.pyx @@ -1,3 +1,4 @@ +# mode: error u'\u12' diff --git a/tests/errors/literal_lists.pyx b/tests/errors/literal_lists.pyx index 7c49f961..46751d62 100644 --- a/tests/errors/literal_lists.pyx +++ b/tests/errors/literal_lists.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): cdef int* p if false(): diff --git a/tests/errors/missing_baseclass_in_predecl_T262.pyx b/tests/errors/missing_baseclass_in_predecl_T262.pyx index 23e07048..ece07b15 100644 --- a/tests/errors/missing_baseclass_in_predecl_T262.pyx +++ b/tests/errors/missing_baseclass_in_predecl_T262.pyx @@ -1,3 +1,6 @@ +# ticket: 262 +# mode: error + cdef class Album cdef class SessionStruct: diff --git a/tests/errors/missing_self_in_cpdef_method_T156.pyx b/tests/errors/missing_self_in_cpdef_method_T156.pyx index 7f060e49..7a3c8b78 100644 --- a/tests/errors/missing_self_in_cpdef_method_T156.pyx +++ b/tests/errors/missing_self_in_cpdef_method_T156.pyx @@ -1,3 +1,5 @@ +# ticket: 156 +# mode: error cdef class B: cpdef b(): diff --git a/tests/errors/missing_self_in_cpdef_method_T165.pyx b/tests/errors/missing_self_in_cpdef_method_T165.pyx index 3b66bc72..fce40f62 100644 --- a/tests/errors/missing_self_in_cpdef_method_T165.pyx +++ b/tests/errors/missing_self_in_cpdef_method_T165.pyx @@ -1,3 +1,5 @@ +# ticket: 165 +# mode: error cdef class A: cpdef a(int not_self): diff --git a/tests/errors/nogil.pyx b/tests/errors/nogil.pyx index 623d1ff4..f1d318d8 100644 --- a/tests/errors/nogil.pyx +++ b/tests/errors/nogil.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef object f(object x) nogil: pass diff --git a/tests/errors/nogilcmeth.pyx b/tests/errors/nogilcmeth.pyx index c7b3ce38..b342d997 100644 --- a/tests/errors/nogilcmeth.pyx +++ b/tests/errors/nogilcmeth.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef class C: cdef void f(self): pass diff --git a/tests/errors/nogilfunctype.pyx b/tests/errors/nogilfunctype.pyx index 9b5580f0..7442761b 100644 --- a/tests/errors/nogilfunctype.pyx +++ b/tests/errors/nogilfunctype.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef extern from *: cdef void f() cdef void (*fp)() nogil diff --git a/tests/errors/nonconst_def.pyx b/tests/errors/nonconst_def.pyx index 5432738a..abc28be5 100644 --- a/tests/errors/nonconst_def.pyx +++ b/tests/errors/nonconst_def.pyx @@ -1,3 +1,5 @@ +# mode: error + import os DEF ospath = os.path diff --git a/tests/errors/notcimportedT418.pyx b/tests/errors/notcimportedT418.pyx index c2dbd0e0..f826368b 100644 --- a/tests/errors/notcimportedT418.pyx +++ b/tests/errors/notcimportedT418.pyx @@ -1,3 +1,6 @@ +# ticket: 418 +# mode: error + import somemod.child cdef somemod.child.something x diff --git a/tests/errors/pxd_cdef_class_declaration_T286.pyx b/tests/errors/pxd_cdef_class_declaration_T286.pyx index 7114bf8f..0c968f70 100644 --- a/tests/errors/pxd_cdef_class_declaration_T286.pyx +++ b/tests/errors/pxd_cdef_class_declaration_T286.pyx @@ -1,3 +1,6 @@ +# ticket: 286 +# mode: error + cdef class A: pass diff --git a/tests/errors/py_ucs4_type_errors.pyx b/tests/errors/py_ucs4_type_errors.pyx index 639b3324..32a0e459 100644 --- a/tests/errors/py_ucs4_type_errors.pyx +++ b/tests/errors/py_ucs4_type_errors.pyx @@ -1,3 +1,4 @@ +# mode: error # -*- coding: iso-8859-1 -*- cdef Py_UCS4 char_ASCII = u'A' diff --git a/tests/errors/py_unicode_type_errors.pyx b/tests/errors/py_unicode_type_errors.pyx index 17fdc9b0..857f3dc8 100644 --- a/tests/errors/py_unicode_type_errors.pyx +++ b/tests/errors/py_unicode_type_errors.pyx @@ -1,3 +1,4 @@ +# mode: error # -*- coding: iso-8859-1 -*- cdef Py_UNICODE char_ASCII = u'A' diff --git a/tests/errors/pyobjcastdisallow_T313.pyx b/tests/errors/pyobjcastdisallow_T313.pyx index 35c9b278..c3251415 100644 --- a/tests/errors/pyobjcastdisallow_T313.pyx +++ b/tests/errors/pyobjcastdisallow_T313.pyx @@ -1,3 +1,5 @@ +# ticket: 313 +# mode: error a = 3 diff --git a/tests/errors/return_outside_function_T135.pyx b/tests/errors/return_outside_function_T135.pyx index 82778ea2..d5e0f462 100644 --- a/tests/errors/return_outside_function_T135.pyx +++ b/tests/errors/return_outside_function_T135.pyx @@ -1,3 +1,5 @@ +# ticket: 135 +# mode: error def _runtime_True(): return True diff --git a/tests/errors/se_badindent.pyx b/tests/errors/se_badindent.pyx index 01f87351..1b29a845 100644 --- a/tests/errors/se_badindent.pyx +++ b/tests/errors/se_badindent.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): a = b # space space c = d # space tab diff --git a/tests/errors/se_badindent2.pyx b/tests/errors/se_badindent2.pyx index a224b707..3c68d8f6 100644 --- a/tests/errors/se_badindent2.pyx +++ b/tests/errors/se_badindent2.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): a = b c = d diff --git a/tests/errors/se_mixtabspace.pyx b/tests/errors/se_mixtabspace.pyx index c8b62102..af28e712 100644 --- a/tests/errors/se_mixtabspace.pyx +++ b/tests/errors/se_mixtabspace.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(): a = b # space space c = d # tab diff --git a/tests/errors/se_multass.pyx b/tests/errors/se_multass.pyx index 14bef3b3..c53ca02f 100644 --- a/tests/errors/se_multass.pyx +++ b/tests/errors/se_multass.pyx @@ -1,3 +1,5 @@ +# mode: error + def f(obj1a, obj2a, obj3a, obj1b, obj2b, obj3b, obj4b): obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b) diff --git a/tests/errors/string_assignments.pyx b/tests/errors/string_assignments.pyx index dd8d3aec..f5484c3a 100644 --- a/tests/errors/string_assignments.pyx +++ b/tests/errors/string_assignments.pyx @@ -1,3 +1,4 @@ +# mode: error # coding: ASCII # ok: diff --git a/tests/errors/subtyping_final_class.pyx b/tests/errors/subtyping_final_class.pyx index 477669b1..a2748c0e 100644 --- a/tests/errors/subtyping_final_class.pyx +++ b/tests/errors/subtyping_final_class.pyx @@ -1,3 +1,4 @@ +# mode: error cimport cython diff --git a/tests/errors/tree_assert.pyx b/tests/errors/tree_assert.pyx index ef931b98..35beefe4 100644 --- a/tests/errors/tree_assert.pyx +++ b/tests/errors/tree_assert.pyx @@ -1,3 +1,4 @@ +# mode: error cimport cython diff --git a/tests/errors/typoT304.pyx b/tests/errors/typoT304.pyx index 8dc4b062..bf740024 100644 --- a/tests/errors/typoT304.pyx +++ b/tests/errors/typoT304.pyx @@ -1,3 +1,5 @@ +# ticket: 304 +# mode: error def f(): print assert sizeof(int) == sizof(short) == sizeof(long) diff --git a/tests/errors/undefinedname.pyx b/tests/errors/undefinedname.pyx index a18645ff..8b531e77 100644 --- a/tests/errors/undefinedname.pyx +++ b/tests/errors/undefinedname.pyx @@ -1,3 +1,5 @@ +# mode: error + i = _this_global_name_does_not_exist_ def test(i): diff --git a/tests/errors/void_as_arg.pyx b/tests/errors/void_as_arg.pyx index 7736ae92..1ae855c2 100644 --- a/tests/errors/void_as_arg.pyx +++ b/tests/errors/void_as_arg.pyx @@ -1,3 +1,5 @@ +# mode: error + cdef extern from *: void foo(void) diff --git a/tests/run/always_allow_keywords_T295.pyx b/tests/run/always_allow_keywords_T295.pyx index 2e47dec6..132489b6 100644 --- a/tests/run/always_allow_keywords_T295.pyx +++ b/tests/run/always_allow_keywords_T295.pyx @@ -1,3 +1,5 @@ +# ticket: 295 + cimport cython diff --git a/tests/run/args_unpacking_in_closure_T658.pyx b/tests/run/args_unpacking_in_closure_T658.pyx index c81d8365..f6401905 100644 --- a/tests/run/args_unpacking_in_closure_T658.pyx +++ b/tests/run/args_unpacking_in_closure_T658.pyx @@ -1,3 +1,4 @@ +# ticket: 658 def outer(int x, *args, **kwargs): """ diff --git a/tests/run/autotestdict_skip.pyx b/tests/run/autotestdict_skip.pyx index 9042606d..3ea6d82a 100644 --- a/tests/run/autotestdict_skip.pyx +++ b/tests/run/autotestdict_skip.pyx @@ -1,4 +1,5 @@ #cython: autotestdict=True + """ Tests that autotestdict doesn't come into effect when a __test__ is defined manually. diff --git a/tests/run/bad_c_struct_T252.pyx b/tests/run/bad_c_struct_T252.pyx index 2b457f23..247a5520 100644 --- a/tests/run/bad_c_struct_T252.pyx +++ b/tests/run/bad_c_struct_T252.pyx @@ -1,3 +1,5 @@ +# ticket: 252 + cdef cf(default=None): return default diff --git a/tests/run/bint_binop_T145.pyx b/tests/run/bint_binop_T145.pyx index 2717272e..5f5ef658 100644 --- a/tests/run/bint_binop_T145.pyx +++ b/tests/run/bint_binop_T145.pyx @@ -1,3 +1,4 @@ +# ticket: 145 cimport cython diff --git a/tests/run/bint_property_T354.pyx b/tests/run/bint_property_T354.pyx index 9a9ce86c..5a461ac7 100644 --- a/tests/run/bint_property_T354.pyx +++ b/tests/run/bint_property_T354.pyx @@ -1,3 +1,4 @@ +# ticket: 354 cdef class Test: """ diff --git a/tests/run/bound_builtin_methods_T589.pyx b/tests/run/bound_builtin_methods_T589.pyx index 4e9cff0b..8896eaec 100644 --- a/tests/run/bound_builtin_methods_T589.pyx +++ b/tests/run/bound_builtin_methods_T589.pyx @@ -1,3 +1,4 @@ +# ticket: 589 cimport cython diff --git a/tests/run/builtin_py3.pyx b/tests/run/builtin_py3.pyx index 55aa0e05..98da7100 100644 --- a/tests/run/builtin_py3.pyx +++ b/tests/run/builtin_py3.pyx @@ -1,3 +1,5 @@ +# tag: py3 + __doc__ = u""" >>> test_xrange() 0 diff --git a/tests/run/builtin_type_inheritance_T608.pyx b/tests/run/builtin_type_inheritance_T608.pyx index 8229a382..af80dae6 100644 --- a/tests/run/builtin_type_inheritance_T608.pyx +++ b/tests/run/builtin_type_inheritance_T608.pyx @@ -1,3 +1,4 @@ +# ticket: 608 cdef class MyInt(int): """ diff --git a/tests/run/builtin_types_none_T166.pyx b/tests/run/builtin_types_none_T166.pyx index fc3db82f..33cabffa 100644 --- a/tests/run/builtin_types_none_T166.pyx +++ b/tests/run/builtin_types_none_T166.pyx @@ -1,3 +1,5 @@ +# ticket: 166 + __doc__ = u""" >>> l = None >>> l.append(2) diff --git a/tests/run/c_int_types_T255.pyx b/tests/run/c_int_types_T255.pyx index 82ca0e57..4e943096 100644 --- a/tests/run/c_int_types_T255.pyx +++ b/tests/run/c_int_types_T255.pyx @@ -1,3 +1,5 @@ +# ticket: 255 + __doc__ = u"" # ------------------------------------------------------------------- diff --git a/tests/run/c_type_methods_T236.pyx b/tests/run/c_type_methods_T236.pyx index 9286d8a2..e5161f6c 100644 --- a/tests/run/c_type_methods_T236.pyx +++ b/tests/run/c_type_methods_T236.pyx @@ -1,3 +1,4 @@ +# ticket: 236 __doc__ = '' diff --git a/tests/run/cascaded_list_unpacking_T467.pyx b/tests/run/cascaded_list_unpacking_T467.pyx index c1187e9f..3008bdda 100644 --- a/tests/run/cascaded_list_unpacking_T467.pyx +++ b/tests/run/cascaded_list_unpacking_T467.pyx @@ -1,3 +1,4 @@ +# ticket: 467 def simple_parallel_assignment_from_call(): """ diff --git a/tests/run/cascaded_typed_assignments_T466.pyx b/tests/run/cascaded_typed_assignments_T466.pyx index 8f03a253..ac754852 100644 --- a/tests/run/cascaded_typed_assignments_T466.pyx +++ b/tests/run/cascaded_typed_assignments_T466.pyx @@ -1,3 +1,4 @@ +# ticket: 466 # extension to T409 def simple_parallel_typed(): diff --git a/tests/run/cdef_bool_T227.pyx b/tests/run/cdef_bool_T227.pyx index 1d4f2fc2..88996395 100644 --- a/tests/run/cdef_bool_T227.pyx +++ b/tests/run/cdef_bool_T227.pyx @@ -1,3 +1,5 @@ +# ticket: 227 + from cpython.bool cimport bool def foo(bool a): diff --git a/tests/run/cdef_decorator_directives_T183.pyx b/tests/run/cdef_decorator_directives_T183.pyx index 69afe934..84b05a8d 100644 --- a/tests/run/cdef_decorator_directives_T183.pyx +++ b/tests/run/cdef_decorator_directives_T183.pyx @@ -1,3 +1,5 @@ +# ticket: 183 + cimport cython @cython.cdivision(True) diff --git a/tests/run/cdef_locals_decorator_T477.pyx b/tests/run/cdef_locals_decorator_T477.pyx index 35aae28b..c495fc91 100644 --- a/tests/run/cdef_locals_decorator_T477.pyx +++ b/tests/run/cdef_locals_decorator_T477.pyx @@ -1,3 +1,5 @@ +# ticket: 477 + import cython @cython.locals(x=double) cdef func(x): diff --git a/tests/run/cdef_members_T517.pyx b/tests/run/cdef_members_T517.pyx index 82699de4..e726da90 100644 --- a/tests/run/cdef_members_T517.pyx +++ b/tests/run/cdef_members_T517.pyx @@ -1,4 +1,6 @@ +# ticket: 517 #cython: embedsignature=True + __doc__ = u""" >>> a = A() >>> a.h = 7 diff --git a/tests/run/cdef_methods_T462.pyx b/tests/run/cdef_methods_T462.pyx index 24440ddf..dde15adb 100644 --- a/tests/run/cdef_methods_T462.pyx +++ b/tests/run/cdef_methods_T462.pyx @@ -1,3 +1,4 @@ +# ticket: 462 cimport cython diff --git a/tests/run/cdef_setitem_T284.pyx b/tests/run/cdef_setitem_T284.pyx index 03ff384e..3a7bcb78 100644 --- a/tests/run/cdef_setitem_T284.pyx +++ b/tests/run/cdef_setitem_T284.pyx @@ -1,3 +1,5 @@ +# ticket: 284 + def no_cdef(): """ >>> no_cdef() diff --git a/tests/run/cfunc_call_tuple_args_T408.pyx b/tests/run/cfunc_call_tuple_args_T408.pyx index eddf68ce..16532973 100644 --- a/tests/run/cfunc_call_tuple_args_T408.pyx +++ b/tests/run/cfunc_call_tuple_args_T408.pyx @@ -1,3 +1,5 @@ +# ticket: 408 + __doc__ = """ >>> call_with_tuple(1, 1.2, 'test', [1,2,3]) (1, 1.2, 'test', [1, 2, 3]) diff --git a/tests/run/char_constants_T99.pyx b/tests/run/char_constants_T99.pyx index a5fe9172..aa2550b5 100644 --- a/tests/run/char_constants_T99.pyx +++ b/tests/run/char_constants_T99.pyx @@ -1,3 +1,5 @@ +# ticket: 99 + cdef char c = 'c' cdef char* s = 'abcdef' diff --git a/tests/run/charcomparisonT412.pyx b/tests/run/charcomparisonT412.pyx index ece80a97..b9316a36 100644 --- a/tests/run/charcomparisonT412.pyx +++ b/tests/run/charcomparisonT412.pyx @@ -1,3 +1,5 @@ +# ticket: 412 + def f(): """ >>> f() diff --git a/tests/run/charptr_comparison_T582.pyx b/tests/run/charptr_comparison_T582.pyx index aecb5b92..3701921c 100644 --- a/tests/run/charptr_comparison_T582.pyx +++ b/tests/run/charptr_comparison_T582.pyx @@ -1,3 +1,4 @@ +# ticket: 582 cimport cython diff --git a/tests/run/cimport_cython_T505.pyx b/tests/run/cimport_cython_T505.pyx index 13a89d83..20d2daf3 100644 --- a/tests/run/cimport_cython_T505.pyx +++ b/tests/run/cimport_cython_T505.pyx @@ -1,3 +1,5 @@ +# ticket: 505 + cimport cython cdef extern from "Python.h": diff --git a/tests/run/class_attribute_init_values_T18.pyx b/tests/run/class_attribute_init_values_T18.pyx index 7372275a..5e12f665 100644 --- a/tests/run/class_attribute_init_values_T18.pyx +++ b/tests/run/class_attribute_init_values_T18.pyx @@ -1,3 +1,5 @@ +# ticket: 18 + __doc__ = u""" >>> f = PyFoo() >>> print(f.bar) diff --git a/tests/run/class_func_in_control_structures_T87.pyx b/tests/run/class_func_in_control_structures_T87.pyx index ed810793..53bf03bb 100644 --- a/tests/run/class_func_in_control_structures_T87.pyx +++ b/tests/run/class_func_in_control_structures_T87.pyx @@ -1,3 +1,4 @@ +# ticket: 87 __doc__ = u""" >>> d = Defined() diff --git a/tests/run/classdecorators_T336.pyx b/tests/run/classdecorators_T336.pyx index 07444c7b..c29c1cba 100644 --- a/tests/run/classdecorators_T336.pyx +++ b/tests/run/classdecorators_T336.pyx @@ -1,3 +1,5 @@ +# ticket: 336 + __doc__ = u""" >>> print('\\n'.join(calls)) Py-Honk PyTestClass diff --git a/tests/run/closure_class_T596.pyx b/tests/run/closure_class_T596.pyx index e2a23418..80434344 100644 --- a/tests/run/closure_class_T596.pyx +++ b/tests/run/closure_class_T596.pyx @@ -1,3 +1,5 @@ +# ticket: 596 + def simple(a, b): """ >>> kls = simple(1, 2) diff --git a/tests/run/closure_decorators_T478.pyx b/tests/run/closure_decorators_T478.pyx index 38a74a0a..182f208c 100644 --- a/tests/run/closure_decorators_T478.pyx +++ b/tests/run/closure_decorators_T478.pyx @@ -1,3 +1,5 @@ +# ticket: 478 + __doc__ = """ >>> Num(13).is_prime() args (Num(13),) kwds {} diff --git a/tests/run/closure_inside_cdef_T554.pyx b/tests/run/closure_inside_cdef_T554.pyx index 1232c6b7..99d7f9f5 100644 --- a/tests/run/closure_inside_cdef_T554.pyx +++ b/tests/run/closure_inside_cdef_T554.pyx @@ -1,3 +1,5 @@ +# ticket: 554 + def call_f(x): """ >>> call_f(2) diff --git a/tests/run/closure_name_mangling_T537.pyx b/tests/run/closure_name_mangling_T537.pyx index f874ce14..453d3c16 100644 --- a/tests/run/closure_name_mangling_T537.pyx +++ b/tests/run/closure_name_mangling_T537.pyx @@ -1,3 +1,4 @@ +# ticket: 537 __doc__ = u""" >>> f1 = nested1() diff --git a/tests/run/closures_T82.pyx b/tests/run/closures_T82.pyx index cbb0a4df..eb6f98b4 100644 --- a/tests/run/closures_T82.pyx +++ b/tests/run/closures_T82.pyx @@ -1,3 +1,4 @@ +# ticket: 82 cimport cython diff --git a/tests/run/complex_cast_T445.pyx b/tests/run/complex_cast_T445.pyx index d64c685c..62709c9c 100644 --- a/tests/run/complex_cast_T445.pyx +++ b/tests/run/complex_cast_T445.pyx @@ -1,3 +1,5 @@ +# ticket: 445 + def complex_double_cast(double x, double complex z): """ >>> complex_double_cast(1, 4-3j) diff --git a/tests/run/complex_int_T446.pyx b/tests/run/complex_int_T446.pyx index f2f2ef02..956ea8eb 100644 --- a/tests/run/complex_int_T446.pyx +++ b/tests/run/complex_int_T446.pyx @@ -1,3 +1,5 @@ +# ticket: 446 + import cython cdef extern from "complex_int_T446_fix.h": diff --git a/tests/run/complex_numbers_T305.pyx b/tests/run/complex_numbers_T305.pyx index 9bcafe74..78969ed8 100644 --- a/tests/run/complex_numbers_T305.pyx +++ b/tests/run/complex_numbers_T305.pyx @@ -1,3 +1,5 @@ +# ticket: 305 + cimport cython def test_object_conversion(o): diff --git a/tests/run/complex_numbers_c89_T398.pyx b/tests/run/complex_numbers_c89_T398.pyx index b098d122..7d680a16 100644 --- a/tests/run/complex_numbers_c89_T398.pyx +++ b/tests/run/complex_numbers_c89_T398.pyx @@ -1,2 +1,4 @@ +# ticket: 398 + cdef extern from "complex_numbers_c89_T398.h": pass include "complex_numbers_T305.pyx" diff --git a/tests/run/complex_numbers_c99_T398.pyx b/tests/run/complex_numbers_c99_T398.pyx index ede24069..762c24b0 100644 --- a/tests/run/complex_numbers_c99_T398.pyx +++ b/tests/run/complex_numbers_c99_T398.pyx @@ -1,2 +1,4 @@ +# ticket: 398 + cdef extern from "complex_numbers_c99_T398.h": pass include "complex_numbers_T305.pyx" diff --git a/tests/run/complex_numbers_cxx_T398.pyx b/tests/run/complex_numbers_cxx_T398.pyx index 75e91247..9b9b69a7 100644 --- a/tests/run/complex_numbers_cxx_T398.pyx +++ b/tests/run/complex_numbers_cxx_T398.pyx @@ -1,2 +1,4 @@ +# ticket: 398 + cdef extern from "complex_numbers_cxx_T398.h": pass include "complex_numbers_T305.pyx" diff --git a/tests/run/contains_T455.pyx b/tests/run/contains_T455.pyx index c66906f3..5caed0b8 100644 --- a/tests/run/contains_T455.pyx +++ b/tests/run/contains_T455.pyx @@ -1,3 +1,5 @@ +# ticket: 455 + def in_sequence(x, seq): """ >>> in_sequence(1, []) diff --git a/tests/run/cpdef_temps_T411.pyx b/tests/run/cpdef_temps_T411.pyx index 7b96f1ce..061d9ef1 100644 --- a/tests/run/cpdef_temps_T411.pyx +++ b/tests/run/cpdef_temps_T411.pyx @@ -1,3 +1,5 @@ +# ticket: 411 + cdef class A: """ >>> A().is_True() diff --git a/tests/run/cpp_bool.pyx b/tests/run/cpp_bool.pyx index 14a7b81e..68fea806 100644 --- a/tests/run/cpp_bool.pyx +++ b/tests/run/cpp_bool.pyx @@ -1,3 +1,5 @@ +# tag: cpp + from libcpp cimport bool def test_bool(bool a): diff --git a/tests/run/cpp_classes.pyx b/tests/run/cpp_classes.pyx index 7005cec1..b2c9e7eb 100644 --- a/tests/run/cpp_classes.pyx +++ b/tests/run/cpp_classes.pyx @@ -1,3 +1,5 @@ +# tag: cpp + __doc__ = u""" >>> test_new_del() (2, 2) diff --git a/tests/run/cpp_exceptions.pyx b/tests/run/cpp_exceptions.pyx index 28cc6679..dbbfc9f0 100644 --- a/tests/run/cpp_exceptions.pyx +++ b/tests/run/cpp_exceptions.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cdef int raise_py_error() except *: raise TypeError("custom") diff --git a/tests/run/cpp_exceptions_nogil.pyx b/tests/run/cpp_exceptions_nogil.pyx index 3fe98222..49acad9d 100644 --- a/tests/run/cpp_exceptions_nogil.pyx +++ b/tests/run/cpp_exceptions_nogil.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cdef int raise_TypeError() except *: raise TypeError("custom") diff --git a/tests/run/cpp_namespaces.pyx b/tests/run/cpp_namespaces.pyx index 40bf18de..08774a2b 100644 --- a/tests/run/cpp_namespaces.pyx +++ b/tests/run/cpp_namespaces.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cdef extern from "cpp_namespaces_helper.h" namespace "A": ctypedef int A_t A_t A_func(A_t first, A_t) diff --git a/tests/run/cpp_nested_templates.pyx b/tests/run/cpp_nested_templates.pyx index 7768a035..f4795226 100644 --- a/tests/run/cpp_nested_templates.pyx +++ b/tests/run/cpp_nested_templates.pyx @@ -1,3 +1,5 @@ +# tag: cpp + from cython.operator cimport dereference as deref cdef extern from "cpp_templates_helper.h": diff --git a/tests/run/cpp_nonstdint.pyx b/tests/run/cpp_nonstdint.pyx index 17c6a23e..62153d19 100644 --- a/tests/run/cpp_nonstdint.pyx +++ b/tests/run/cpp_nonstdint.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cdef extern from "cpp_nonstdint.h": ctypedef int Int24 ctypedef int Int56 diff --git a/tests/run/cpp_operators.pyx b/tests/run/cpp_operators.pyx index 8cb97f93..73ace96a 100644 --- a/tests/run/cpp_operators.pyx +++ b/tests/run/cpp_operators.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cimport cython.operator from cython.operator cimport dereference as deref diff --git a/tests/run/cpp_stl.pyx b/tests/run/cpp_stl.pyx index 4d3c0f05..f3bf5b56 100644 --- a/tests/run/cpp_stl.pyx +++ b/tests/run/cpp_stl.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cdef extern from "vector" namespace "std": cdef cppclass vector[T]: diff --git a/tests/run/cpp_stl_vector.pyx b/tests/run/cpp_stl_vector.pyx index 4e03706b..979c40d6 100644 --- a/tests/run/cpp_stl_vector.pyx +++ b/tests/run/cpp_stl_vector.pyx @@ -1,3 +1,5 @@ +# tag: cpp + from cython.operator cimport dereference as d from cython.operator cimport preincrement as incr diff --git a/tests/run/cpp_templates.pyx b/tests/run/cpp_templates.pyx index 12007f4c..877f6d0e 100644 --- a/tests/run/cpp_templates.pyx +++ b/tests/run/cpp_templates.pyx @@ -1,3 +1,5 @@ +# tag: cpp + from cython.operator import dereference as deref cdef extern from "cpp_templates_helper.h": diff --git a/tests/run/crashT245.pyx b/tests/run/crashT245.pyx index 511beaef..862deca3 100644 --- a/tests/run/crashT245.pyx +++ b/tests/run/crashT245.pyx @@ -1,3 +1,5 @@ +# ticket: 245 + cimport crashT245_pxd def f(): diff --git a/tests/run/ctypedef_int_types_T333.pyx b/tests/run/ctypedef_int_types_T333.pyx index 65963d01..4cfe35b9 100644 --- a/tests/run/ctypedef_int_types_T333.pyx +++ b/tests/run/ctypedef_int_types_T333.pyx @@ -1,3 +1,4 @@ +# ticket: 333 #cython: autotestdict=True # ------------------------------------------------------------------- diff --git a/tests/run/decorators_T593.pyx b/tests/run/decorators_T593.pyx index e9119ad2..e2b59939 100644 --- a/tests/run/decorators_T593.pyx +++ b/tests/run/decorators_T593.pyx @@ -1,3 +1,5 @@ +# ticket: 593 + """ >>> am_i_buggy False diff --git a/tests/run/division_T384.pyx b/tests/run/division_T384.pyx index 7c4ba4ab..301dc3a6 100644 --- a/tests/run/division_T384.pyx +++ b/tests/run/division_T384.pyx @@ -1,3 +1,5 @@ +# ticket: 384 + """ >>> test(3) (3+1j) diff --git a/tests/run/ellipsis_T488.pyx b/tests/run/ellipsis_T488.pyx index 909ee608..e7892dbc 100644 --- a/tests/run/ellipsis_T488.pyx +++ b/tests/run/ellipsis_T488.pyx @@ -1,3 +1,5 @@ +# ticket: 488 + """ >>> test() """ diff --git a/tests/run/empty_for_loop_T208.pyx b/tests/run/empty_for_loop_T208.pyx index 46deed25..88a134f2 100644 --- a/tests/run/empty_for_loop_T208.pyx +++ b/tests/run/empty_for_loop_T208.pyx @@ -1,3 +1,5 @@ +# ticket: 208 + def go_py_empty(): """ >>> go_py_empty() diff --git a/tests/run/enumerate_T316.pyx b/tests/run/enumerate_T316.pyx index 5b66c6bb..658f2fe6 100644 --- a/tests/run/enumerate_T316.pyx +++ b/tests/run/enumerate_T316.pyx @@ -1,3 +1,5 @@ +# ticket: 316 + cimport cython @cython.test_fail_if_path_exists("//SimpleCallNode//NameNode[@name = 'enumerate']") diff --git a/tests/run/ext_instance_type_T232.pyx b/tests/run/ext_instance_type_T232.pyx index 29bf7008..9538a9b9 100644 --- a/tests/run/ext_instance_type_T232.pyx +++ b/tests/run/ext_instance_type_T232.pyx @@ -1,3 +1,5 @@ +# ticket: 232 + cdef class MyExt: cdef object attr diff --git a/tests/run/extended_unpacking_T235.pyx b/tests/run/extended_unpacking_T235.pyx index 9f7e9cac..4ce1ecf6 100644 --- a/tests/run/extended_unpacking_T235.pyx +++ b/tests/run/extended_unpacking_T235.pyx @@ -1,3 +1,5 @@ +# ticket: 235 + __doc__ = u""" >>> class FakeSeq(object): ... def __init__(self, length): diff --git a/tests/run/extended_unpacking_T409.pyx b/tests/run/extended_unpacking_T409.pyx index 7b001e1b..1198a15f 100644 --- a/tests/run/extended_unpacking_T409.pyx +++ b/tests/run/extended_unpacking_T409.pyx @@ -1,3 +1,5 @@ +# ticket: 409 + def simple(): """ >>> simple() diff --git a/tests/run/extern_builtins_T258.pyx b/tests/run/extern_builtins_T258.pyx index 902063bc..d732931d 100644 --- a/tests/run/extern_builtins_T258.pyx +++ b/tests/run/extern_builtins_T258.pyx @@ -1,3 +1,5 @@ +# ticket: 258 + cdef extern from "Python.h": ctypedef class __builtin__.list [object PyListObject]: diff --git a/tests/run/float_floor_division_T260.pyx b/tests/run/float_floor_division_T260.pyx index 7b135ac7..66f6f83f 100644 --- a/tests/run/float_floor_division_T260.pyx +++ b/tests/run/float_floor_division_T260.pyx @@ -1,3 +1,5 @@ +# ticket: 260 + def floor_div_float(double a, double b): """ >>> floor_div_float(2, 1.5) diff --git a/tests/run/float_len_T480.pyx b/tests/run/float_len_T480.pyx index d5651a20..efb456c5 100644 --- a/tests/run/float_len_T480.pyx +++ b/tests/run/float_len_T480.pyx @@ -1,3 +1,5 @@ +# ticket: 480 + def f(x): return x diff --git a/tests/run/for_from_float_T254.pyx b/tests/run/for_from_float_T254.pyx index 554d9771..0ea153a9 100644 --- a/tests/run/for_from_float_T254.pyx +++ b/tests/run/for_from_float_T254.pyx @@ -1,3 +1,5 @@ +# ticket: 254 + def double_target(a, b): """ >>> double_target(0, 4) diff --git a/tests/run/for_from_pyvar_loop_T601.pyx b/tests/run/for_from_pyvar_loop_T601.pyx index 11b7e195..30fc2b7d 100644 --- a/tests/run/for_from_pyvar_loop_T601.pyx +++ b/tests/run/for_from_pyvar_loop_T601.pyx @@ -1,3 +1,4 @@ +# ticket: 601 cdef unsigned long size2(): return 3 diff --git a/tests/run/for_in_break_continue_T533.pyx b/tests/run/for_in_break_continue_T533.pyx index 23c27246..0baa9fa4 100644 --- a/tests/run/for_in_break_continue_T533.pyx +++ b/tests/run/for_in_break_continue_T533.pyx @@ -1,3 +1,4 @@ +# ticket: 533 def for_in(): """ diff --git a/tests/run/for_in_range_T372.pyx b/tests/run/for_in_range_T372.pyx index 6ba4ee47..7244d40f 100644 --- a/tests/run/for_in_range_T372.pyx +++ b/tests/run/for_in_range_T372.pyx @@ -1,3 +1,5 @@ +# ticket: 372 + cimport cython @cython.test_assert_path_exists("//ForFromStatNode") diff --git a/tests/run/funcexc_iter_T228.pyx b/tests/run/funcexc_iter_T228.pyx index 0fa6563e..0c5bde25 100644 --- a/tests/run/funcexc_iter_T228.pyx +++ b/tests/run/funcexc_iter_T228.pyx @@ -1,3 +1,5 @@ +# ticket: 228 + __doc__ = u""" >>> def py_iterator(): ... if True: return diff --git a/tests/run/function_as_method_T494.pyx b/tests/run/function_as_method_T494.pyx index ee2bc53e..111a211a 100644 --- a/tests/run/function_as_method_T494.pyx +++ b/tests/run/function_as_method_T494.pyx @@ -1,3 +1,5 @@ +# ticket: 494 + __doc__ = """ >>> A.foo = foo >>> print A().foo() diff --git a/tests/run/function_binding_T494.pyx b/tests/run/function_binding_T494.pyx index 820d52ea..b41221e2 100644 --- a/tests/run/function_binding_T494.pyx +++ b/tests/run/function_binding_T494.pyx @@ -1,3 +1,5 @@ +# ticket: 494 + cimport cython class SomeNumber(object): diff --git a/tests/run/genexpr_T491.pyx b/tests/run/genexpr_T491.pyx index b2babf07..7fa6c175 100644 --- a/tests/run/genexpr_T491.pyx +++ b/tests/run/genexpr_T491.pyx @@ -1,3 +1,4 @@ +# ticket: 491 def test_genexpr(): """ diff --git a/tests/run/genexpr_iterable_lookup_T600.pyx b/tests/run/genexpr_iterable_lookup_T600.pyx index fa64da02..429022f9 100644 --- a/tests/run/genexpr_iterable_lookup_T600.pyx +++ b/tests/run/genexpr_iterable_lookup_T600.pyx @@ -1,3 +1,4 @@ +# ticket: 600 cimport cython diff --git a/tests/run/hash_T326.pyx b/tests/run/hash_T326.pyx index 32bcc59d..0d8b42e4 100644 --- a/tests/run/hash_T326.pyx +++ b/tests/run/hash_T326.pyx @@ -1,3 +1,5 @@ +# ticket: 326 + __doc__ = u""" >>> hash(A(5)) diff --git a/tests/run/ifelseexpr_T267.pyx b/tests/run/ifelseexpr_T267.pyx index 41f412a6..5f32628b 100644 --- a/tests/run/ifelseexpr_T267.pyx +++ b/tests/run/ifelseexpr_T267.pyx @@ -1,3 +1,5 @@ +# ticket: 267 + """ >>> constants(4) 1 diff --git a/tests/run/in_list_with_side_effects_T544.pyx b/tests/run/in_list_with_side_effects_T544.pyx index aa6e6c23..3bb3954c 100644 --- a/tests/run/in_list_with_side_effects_T544.pyx +++ b/tests/run/in_list_with_side_effects_T544.pyx @@ -1,3 +1,4 @@ +# ticket: 544 def count(i=[0]): i[0] += 1 diff --git a/tests/run/int_float_builtins_as_casts_T400.pyx b/tests/run/int_float_builtins_as_casts_T400.pyx index c4d4b064..c18ee01e 100644 --- a/tests/run/int_float_builtins_as_casts_T400.pyx +++ b/tests/run/int_float_builtins_as_casts_T400.pyx @@ -1,3 +1,4 @@ +# ticket: 400 cimport cython diff --git a/tests/run/intern_T431.pyx b/tests/run/intern_T431.pyx index 5cbd0066..5851d974 100644 --- a/tests/run/intern_T431.pyx +++ b/tests/run/intern_T431.pyx @@ -1,3 +1,5 @@ +# ticket: 431 + __doc__ = u""" >>> s == s_interned True diff --git a/tests/run/ipow_crash_T562.pyx b/tests/run/ipow_crash_T562.pyx index 2cba7901..6fea958b 100644 --- a/tests/run/ipow_crash_T562.pyx +++ b/tests/run/ipow_crash_T562.pyx @@ -1,3 +1,5 @@ +# ticket: 562 + class IPOW: """ >>> IPOW().__ipow__('a') diff --git a/tests/run/lambda_T195.pyx b/tests/run/lambda_T195.pyx index 447f3d4f..88b44aef 100644 --- a/tests/run/lambda_T195.pyx +++ b/tests/run/lambda_T195.pyx @@ -1,3 +1,5 @@ +# ticket: 195 + __doc__ = u""" #>>> py_identity = lambda x:x #>>> py_identity(1) == cy_identity(1) diff --git a/tests/run/lambda_class_T605.pyx b/tests/run/lambda_class_T605.pyx index eb3b8a52..23ff8c14 100644 --- a/tests/run/lambda_class_T605.pyx +++ b/tests/run/lambda_class_T605.pyx @@ -1,3 +1,5 @@ +# ticket: 605 + cdef int cdef_CONST = 123 CONST = 456 diff --git a/tests/run/lambda_module_T603.pyx b/tests/run/lambda_module_T603.pyx index 8bc3ef0b..246a4517 100644 --- a/tests/run/lambda_module_T603.pyx +++ b/tests/run/lambda_module_T603.pyx @@ -1,4 +1,6 @@ +# ticket: 603 # Module scope lambda functions + __doc__ = """ >>> pow2(16) 256 diff --git a/tests/run/large_consts_T237.pyx b/tests/run/large_consts_T237.pyx index 4eccf30b..f11a2454 100644 --- a/tests/run/large_consts_T237.pyx +++ b/tests/run/large_consts_T237.pyx @@ -1,3 +1,4 @@ +# ticket: 237 #def add_large_c(): # cdef unsigned long long val = 2**30 + 2**30 # return val diff --git a/tests/run/list_comp_in_closure_T598.pyx b/tests/run/list_comp_in_closure_T598.pyx index 3e833601..fceffd56 100644 --- a/tests/run/list_comp_in_closure_T598.pyx +++ b/tests/run/list_comp_in_closure_T598.pyx @@ -1,3 +1,4 @@ +# ticket: 598 # cython: language_level=3 def list_comp_in_closure(): diff --git a/tests/run/locals_expressions_T430.pyx b/tests/run/locals_expressions_T430.pyx index 36a044f0..78d58fc8 100644 --- a/tests/run/locals_expressions_T430.pyx +++ b/tests/run/locals_expressions_T430.pyx @@ -1,3 +1,5 @@ +# ticket: 430 + __doc__ = u""" >>> sorted( get_locals(1,2,3, k=5) .items()) [('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)] diff --git a/tests/run/locals_rebind_T429.pyx b/tests/run/locals_rebind_T429.pyx index 2c9d7969..9b3f06a5 100644 --- a/tests/run/locals_rebind_T429.pyx +++ b/tests/run/locals_rebind_T429.pyx @@ -1,3 +1,5 @@ +# ticket: 429 + __doc__ = u""" >>> sorted( get_locals(1,2,3, k=5) .items()) [('args', (2, 3)), ('kwds', {'k': 5}), ('x', 1), ('y', 'hi'), ('z', 5)] diff --git a/tests/run/method_module_name_T422.pyx b/tests/run/method_module_name_T422.pyx index f7334c26..fbefa214 100644 --- a/tests/run/method_module_name_T422.pyx +++ b/tests/run/method_module_name_T422.pyx @@ -1,3 +1,5 @@ +# ticket: 422 + """ >>> Foo.incr.__module__ is not None True diff --git a/tests/run/methodmangling_T5.pyx b/tests/run/methodmangling_T5.pyx index c3dd0b2f..44b165b8 100644 --- a/tests/run/methodmangling_T5.pyx +++ b/tests/run/methodmangling_T5.pyx @@ -1,3 +1,4 @@ +# ticket: 5 # this is ticket #5 __doc__ = u""" diff --git a/tests/run/non_dict_kwargs_T470.pyx b/tests/run/non_dict_kwargs_T470.pyx index 1a4f17ba..47221fa0 100644 --- a/tests/run/non_dict_kwargs_T470.pyx +++ b/tests/run/non_dict_kwargs_T470.pyx @@ -1,3 +1,5 @@ +# ticket: 470 + __doc__ = u""" >>> func(**{'a' : 7}) True diff --git a/tests/run/numpy_ValueError_T172.pyx b/tests/run/numpy_ValueError_T172.pyx index 6930ee41..66558eef 100644 --- a/tests/run/numpy_ValueError_T172.pyx +++ b/tests/run/numpy_ValueError_T172.pyx @@ -1,3 +1,6 @@ +# ticket: 172 +# tag: numpy + __doc__ = u""" >>> 1 1 diff --git a/tests/run/numpy_bufacc_T155.pyx b/tests/run/numpy_bufacc_T155.pyx index 38549a02..6de42a28 100644 --- a/tests/run/numpy_bufacc_T155.pyx +++ b/tests/run/numpy_bufacc_T155.pyx @@ -1,3 +1,6 @@ +# ticket: 155 +# tag: numpy + """ >>> myfunc() 0.5 diff --git a/tests/run/numpy_cimport.pyx b/tests/run/numpy_cimport.pyx index 51ce5196..7c23d772 100644 --- a/tests/run/numpy_cimport.pyx +++ b/tests/run/numpy_cimport.pyx @@ -1,3 +1,5 @@ +# tag: numpy + """ >>> import sys >>> 'numpy' in sys.modules diff --git a/tests/run/numpy_test.pyx b/tests/run/numpy_test.pyx index 052d2ae4..ea717f91 100644 --- a/tests/run/numpy_test.pyx +++ b/tests/run/numpy_test.pyx @@ -1,3 +1,4 @@ +# tag: numpy # cannot be named "numpy" in order to not clash with the numpy module! cimport numpy as np diff --git a/tests/run/packedstruct_T290.pyx b/tests/run/packedstruct_T290.pyx index 2c6bcc72..203008ca 100644 --- a/tests/run/packedstruct_T290.pyx +++ b/tests/run/packedstruct_T290.pyx @@ -1,3 +1,5 @@ +# ticket: 290 + """ >>> f() (9, 9) diff --git a/tests/run/parallel_swap_assign_T425.pyx b/tests/run/parallel_swap_assign_T425.pyx index aafdbec0..fb7d1ac2 100644 --- a/tests/run/parallel_swap_assign_T425.pyx +++ b/tests/run/parallel_swap_assign_T425.pyx @@ -1,3 +1,5 @@ +# ticket: 425 + cimport cython @cython.test_assert_path_exists( diff --git a/tests/run/pyfunction_redefine_T489.pyx b/tests/run/pyfunction_redefine_T489.pyx index 7add3880..cf393407 100644 --- a/tests/run/pyfunction_redefine_T489.pyx +++ b/tests/run/pyfunction_redefine_T489.pyx @@ -1,3 +1,5 @@ +# ticket: 489 + """ >>> xxx [0, 1, 2, 3] diff --git a/tests/run/pyobjcast_T313.pyx b/tests/run/pyobjcast_T313.pyx index aac975af..fb4ef80a 100644 --- a/tests/run/pyobjcast_T313.pyx +++ b/tests/run/pyobjcast_T313.pyx @@ -1,3 +1,4 @@ +# ticket: 313 # Ensure casting still works to void* """ diff --git a/tests/run/raise_memory_error_T650.pyx b/tests/run/raise_memory_error_T650.pyx index da149488..1fcc7627 100644 --- a/tests/run/raise_memory_error_T650.pyx +++ b/tests/run/raise_memory_error_T650.pyx @@ -1,3 +1,4 @@ +# ticket: 650 cimport cython diff --git a/tests/run/range_optimisation_T203.pyx b/tests/run/range_optimisation_T203.pyx index 690dd1dd..880d8952 100644 --- a/tests/run/range_optimisation_T203.pyx +++ b/tests/run/range_optimisation_T203.pyx @@ -1,3 +1,5 @@ +# ticket: 203 + cdef int get_bound(int m): print u"get_bound(%s)"%m return m diff --git a/tests/run/refcount_in_meth.pyx b/tests/run/refcount_in_meth.pyx index 88c7d892..0118a640 100644 --- a/tests/run/refcount_in_meth.pyx +++ b/tests/run/refcount_in_meth.pyx @@ -1,4 +1,5 @@ #!/usr/bin/env python + __doc__=u""" >>> t = RefCountInMeth() >>> t.chk_meth() diff --git a/tests/run/short_circuit_T404.pyx b/tests/run/short_circuit_T404.pyx index b49e328b..09affaf7 100644 --- a/tests/run/short_circuit_T404.pyx +++ b/tests/run/short_circuit_T404.pyx @@ -1,3 +1,5 @@ +# ticket: 404 + cdef long foo(long x): print "foo(%s)" % x return x diff --git a/tests/run/special_methods_T561.pyx b/tests/run/special_methods_T561.pyx index 3a6eb1c0..fba5e93e 100644 --- a/tests/run/special_methods_T561.pyx +++ b/tests/run/special_methods_T561.pyx @@ -1,3 +1,4 @@ +# ticket: 561 # The patch in #561 changes code generation for most special methods # to remove the Cython-generated wrapper and let PyType_Ready() # generate its own wrapper. (This wrapper would be used, for instance, diff --git a/tests/run/special_methods_T561_py2.pyx b/tests/run/special_methods_T561_py2.pyx index 1031976c..285f820f 100644 --- a/tests/run/special_methods_T561_py2.pyx +++ b/tests/run/special_methods_T561_py2.pyx @@ -1,3 +1,5 @@ +# ticket: 561 +# tag: py2 # This file tests the behavior of special methods under Python 2 # after #561. (Only methods whose behavior differs between Python 2 and 3 # are tested here; see special_methods_T561.pyx for the rest of the tests.) diff --git a/tests/run/special_methods_T561_py3.pyx b/tests/run/special_methods_T561_py3.pyx index 5574067e..93200225 100644 --- a/tests/run/special_methods_T561_py3.pyx +++ b/tests/run/special_methods_T561_py3.pyx @@ -1,3 +1,5 @@ +# ticket: 561 +# tag: py3 # This file tests the behavior of special methods under Python 3 # after #561. (Only methods whose behavior differs between Python 2 and 3 # are tested here; see special_methods_T561.pyx for the rest of the tests.) diff --git a/tests/run/ssize_t_T399.pyx b/tests/run/ssize_t_T399.pyx index b4559477..4a8f65d6 100644 --- a/tests/run/ssize_t_T399.pyx +++ b/tests/run/ssize_t_T399.pyx @@ -1,3 +1,5 @@ +# ticket: 399 + __doc__ = u""" >>> test(-2) -2 diff --git a/tests/run/starred_target_T664.pyx b/tests/run/starred_target_T664.pyx index b0e20699..0d291c64 100644 --- a/tests/run/starred_target_T664.pyx +++ b/tests/run/starred_target_T664.pyx @@ -1,3 +1,5 @@ +# ticket: 664 + def assign(): """ >>> assign() diff --git a/tests/run/str_char_coercion_T412.pyx b/tests/run/str_char_coercion_T412.pyx index ff796e90..6a470e2b 100644 --- a/tests/run/str_char_coercion_T412.pyx +++ b/tests/run/str_char_coercion_T412.pyx @@ -1,3 +1,5 @@ +# ticket: 412 + cdef int i = 'x' cdef char c = 'x' cdef char* s = 'x' diff --git a/tests/run/temp_alloc_T409.pyx b/tests/run/temp_alloc_T409.pyx index 823a0a5c..383e1ef6 100644 --- a/tests/run/temp_alloc_T409.pyx +++ b/tests/run/temp_alloc_T409.pyx @@ -1,3 +1,4 @@ +# ticket: 409 # Extracted from sage/plot/plot3d/index_face_set.pyx:502 # Turns out to be a bug in implementation of PEP 3132 (Extended Iterable Unpacking) diff --git a/tests/run/temp_sideeffects_T654.pyx b/tests/run/temp_sideeffects_T654.pyx index fc44ba2b..6bb5ee54 100644 --- a/tests/run/temp_sideeffects_T654.pyx +++ b/tests/run/temp_sideeffects_T654.pyx @@ -1,3 +1,4 @@ +# ticket: 654 # function call arguments diff --git a/tests/run/tp_new_T454.pyx b/tests/run/tp_new_T454.pyx index 2482f612..893ef9b1 100644 --- a/tests/run/tp_new_T454.pyx +++ b/tests/run/tp_new_T454.pyx @@ -1,3 +1,4 @@ +# ticket: 454 cimport cython diff --git a/tests/run/tupleunpack_T298.pyx b/tests/run/tupleunpack_T298.pyx index 87f24bb9..7763b1fc 100644 --- a/tests/run/tupleunpack_T298.pyx +++ b/tests/run/tupleunpack_T298.pyx @@ -1,3 +1,5 @@ +# ticket: 298 + """ >>> func() 0 0 diff --git a/tests/run/type_slots_int_long_T287.pyx b/tests/run/type_slots_int_long_T287.pyx index 654ff6e3..2426225b 100644 --- a/tests/run/type_slots_int_long_T287.pyx +++ b/tests/run/type_slots_int_long_T287.pyx @@ -1,3 +1,5 @@ +# ticket: 287 + __doc__ = u""" >>> print( "%d" % Int() ) 2 diff --git a/tests/run/typeddefaultargT373.pyx b/tests/run/typeddefaultargT373.pyx index bfb6047a..98ac85c3 100644 --- a/tests/run/typeddefaultargT373.pyx +++ b/tests/run/typeddefaultargT373.pyx @@ -1,3 +1,5 @@ +# ticket: 373 + import math cdef class MyClass: diff --git a/tests/run/typedfieldbug_T303.pyx b/tests/run/typedfieldbug_T303.pyx index aeb5c93a..cd736f74 100644 --- a/tests/run/typedfieldbug_T303.pyx +++ b/tests/run/typedfieldbug_T303.pyx @@ -1,3 +1,5 @@ +# ticket: 303 + __doc__ = """ >>> readonly() #doctest: +ELLIPSIS Traceback (most recent call last): diff --git a/tests/run/typetest_T417.pyx b/tests/run/typetest_T417.pyx index 09b1c0bd..757e15b8 100644 --- a/tests/run/typetest_T417.pyx +++ b/tests/run/typetest_T417.pyx @@ -1,3 +1,4 @@ +# ticket: 417 #cython: autotestdict=True cdef class Foo: diff --git a/tests/run/unsigned_char_ptr_bytes_conversion_T359.pyx b/tests/run/unsigned_char_ptr_bytes_conversion_T359.pyx index f525c905..c40c5036 100644 --- a/tests/run/unsigned_char_ptr_bytes_conversion_T359.pyx +++ b/tests/run/unsigned_char_ptr_bytes_conversion_T359.pyx @@ -1,3 +1,5 @@ +# ticket: 359 + __doc__ = u""" >>> py_string1.decode('ASCII') == 'test toast taste' True diff --git a/tests/run/unsignedbehaviour_T184.pyx b/tests/run/unsignedbehaviour_T184.pyx index 225de2f3..9cbf65fc 100644 --- a/tests/run/unsignedbehaviour_T184.pyx +++ b/tests/run/unsignedbehaviour_T184.pyx @@ -1,3 +1,5 @@ +# ticket: 184 + """ >>> c_call() (-10, 10) diff --git a/tests/run/with_statement_module_level_T536.pyx b/tests/run/with_statement_module_level_T536.pyx index daf38d3d..bc163b56 100644 --- a/tests/run/with_statement_module_level_T536.pyx +++ b/tests/run/with_statement_module_level_T536.pyx @@ -1,3 +1,4 @@ +# ticket: 536 __doc__ = """ >>> inner_result diff --git a/tests/wrappers/cpp_overload_wrapper.pyx b/tests/wrappers/cpp_overload_wrapper.pyx index 8b9b8411..cc00ee83 100644 --- a/tests/wrappers/cpp_overload_wrapper.pyx +++ b/tests/wrappers/cpp_overload_wrapper.pyx @@ -1,3 +1,4 @@ +# tag: cpp cimport cpp_overload_wrapper_lib as cppwrap_lib diff --git a/tests/wrappers/cpp_references.pyx b/tests/wrappers/cpp_references.pyx index ec19a5a2..cc8a0b90 100644 --- a/tests/wrappers/cpp_references.pyx +++ b/tests/wrappers/cpp_references.pyx @@ -1,3 +1,5 @@ +# tag: cpp + cimport cython