From c0c11c66bcdac4ee7c58904981d632e49132481c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 2 Apr 2011 10:50:18 -0700 Subject: [PATCH] Fix error line numbers (due to tag additions). --- tests/errors/break_outside_loop.pyx | 14 +- tests/errors/buffertypedef_T117.pyx | 2 +- tests/errors/builtin_type_inheritance.pyx | 6 +- tests/errors/callargs.pyx | 2 +- tests/errors/callingnonexisting_T307.pyx | 2 +- tests/errors/cdef_members_T517.pyx | 14 +- tests/errors/cdef_syntax.pyx | 6 +- tests/errors/cdefoptargs.pyx | 2 +- tests/errors/cdefspecial.pyx | 4 +- tests/errors/cmethbasematch.pyx | 4 +- tests/errors/continue_outside_loop.pyx | 14 +- tests/errors/cpdef_syntax.pyx | 6 +- tests/errors/cpp_no_constructor.pyx | 2 +- tests/errors/cython3_bytes.pyx | 2 +- tests/errors/declareafteruse_T158.pyx | 30 ++--- tests/errors/def_nogil.pyx | 2 +- tests/errors/e2_packedstruct_T290.pyx | 2 +- tests/errors/e_addop.pyx | 2 +- tests/errors/e_argdefault.pyx | 8 +- tests/errors/e_ass.pyx | 6 +- tests/errors/e_assnone.pyx | 2 +- tests/errors/e_autotestdict.pyx | 2 +- tests/errors/e_badexcvaltype.pyx | 4 +- tests/errors/e_badfuncargtype.pyx | 6 +- tests/errors/e_badpyparam.pyx | 2 +- tests/errors/e_badtypeuse.pyx | 28 ++-- tests/errors/e_bitop.pyx | 2 +- tests/errors/e_boolcoerce.pyx | 16 +-- tests/errors/e_bufaccess.pyx | 6 +- tests/errors/e_bufaccess2.pyx | 10 +- tests/errors/e_callnonfunction.pyx | 6 +- tests/errors/e_callspec.pyx | 4 +- tests/errors/e_cdef_keywords_T241.pyx | 4 +- tests/errors/e_cdef_missing_declarator.pyx | 2 +- tests/errors/e_cdefassign.pyx | 4 +- tests/errors/e_cdefemptysue.pyx | 6 +- tests/errors/e_cenum.pyx | 2 +- tests/errors/e_cmethbasematch.pyx | 4 +- tests/errors/e_cmp.pyx | 6 +- tests/errors/e_cstruct.pyx | 12 +- tests/errors/e_ctypedefforward.pyx | 2 +- tests/errors/e_ctypedefornot.pyx | 4 +- tests/errors/e_declarations.pyx | 8 +- tests/errors/e_del.pyx | 8 +- tests/errors/e_directives.pyx | 4 +- tests/errors/e_exceptclause.pyx | 4 +- tests/errors/e_excvalfunctype.pyx | 4 +- tests/errors/e_extweakref.pyx | 16 +-- tests/errors/e_generators.pyx | 10 +- tests/errors/e_index.pyx | 8 +- tests/errors/e_int_literals_py2.py | 2 +- tests/errors/e_int_literals_py3.py | 2 +- tests/errors/e_multass.pyx | 2 +- tests/errors/e_nargs.pyx | 10 +- tests/errors/e_nogilcmeth.pyx | 2 +- tests/errors/e_nogilfunctype.pyx | 2 +- tests/errors/e_nonlocal_T490.pyx | 2 +- tests/errors/e_nosignword.pyx | 4 +- tests/errors/e_notnone.pyx | 2 +- tests/errors/e_notnone2.pyx | 4 +- tests/errors/e_numop.pyx | 2 +- tests/errors/e_packedstruct_T290.pyx | 2 +- tests/errors/e_powop.pyx | 4 +- tests/errors/e_pxdimpl.pyx | 2 +- tests/errors/e_pyobinstruct.pyx | 2 +- tests/errors/e_return.pyx | 6 +- tests/errors/e_sizeofincomplete.pyx | 2 +- tests/errors/e_slice.pyx | 10 +- tests/errors/e_strcoerce.pyx | 8 +- tests/errors/e_subop.pyx | 4 +- tests/errors/e_switch.pyx | 2 +- tests/errors/e_tempcast.pyx | 2 +- tests/errors/e_undefexttype.pyx | 4 +- tests/errors/e_unop.pyx | 4 +- tests/errors/e_while.pyx | 4 +- tests/errors/encoding.pyx | 4 +- tests/errors/extclassattrsetting.pyx | 2 +- tests/errors/extended_unpacking.pyx | 22 +-- tests/errors/extended_unpacking_parser.pyx | 14 +- tests/errors/extended_unpacking_parser2.pyx | 4 +- tests/errors/futurebraces.pyx | 2 +- tests/errors/invalid_cast.pyx | 2 +- tests/errors/invalid_hex_escape0.pyx | 2 +- tests/errors/invalid_hex_escape1.pyx | 2 +- tests/errors/invalid_uescape.pyx | 2 +- tests/errors/invalid_uescape0.pyx | 2 +- tests/errors/invalid_uescape2.pyx | 2 +- tests/errors/literal_lists.pyx | 2 +- .../missing_self_in_cpdef_method_T156.pyx | 2 +- .../missing_self_in_cpdef_method_T165.pyx | 2 +- tests/errors/nogil.pyx | 126 +++++++++--------- tests/errors/nogilcmeth.pyx | 2 +- tests/errors/nogilfunctype.pyx | 2 +- tests/errors/nonconst_def.pyx | 4 +- tests/errors/notcimportedT418.pyx | 2 +- tests/errors/py_ucs4_type_errors.pyx | 8 +- tests/errors/py_unicode_type_errors.pyx | 8 +- tests/errors/pyobjcastdisallow_T313.pyx | 2 +- tests/errors/return_outside_function_T135.pyx | 16 +-- tests/errors/se_badindent.pyx | 2 +- tests/errors/se_badindent2.pyx | 4 +- tests/errors/se_mixtabspace.pyx | 2 +- tests/errors/se_multass.pyx | 2 +- tests/errors/string_assignments.pyx | 44 +++--- tests/errors/subtyping_final_class.pyx | 2 +- tests/errors/tree_assert.pyx | 8 +- tests/errors/typoT304.pyx | 2 +- tests/errors/undefinedname.pyx | 4 +- tests/errors/void_as_arg.pyx | 2 +- 109 files changed, 363 insertions(+), 361 deletions(-) diff --git a/tests/errors/break_outside_loop.pyx b/tests/errors/break_outside_loop.pyx index 0f635b6d..f20b4d33 100644 --- a/tests/errors/break_outside_loop.pyx +++ b/tests/errors/break_outside_loop.pyx @@ -27,11 +27,11 @@ def bool_result(): _ERRORS = u''' -2:0: break statement not inside loop -5:4: break statement not inside loop -8:4: break statement not inside loop -11:4: break statement not inside loop -16:5: break statement not inside loop -20:4: break statement not inside loop -22:4: break statement not inside loop +3:0: break statement not inside loop +6:4: break statement not inside loop +9:4: break statement not inside loop +12:4: break statement not inside loop +17:5: break statement not inside loop +21:4: break statement not inside loop +23:4: break statement not inside loop ''' diff --git a/tests/errors/buffertypedef_T117.pyx b/tests/errors/buffertypedef_T117.pyx index e3592185..927ea23b 100644 --- a/tests/errors/buffertypedef_T117.pyx +++ b/tests/errors/buffertypedef_T117.pyx @@ -4,5 +4,5 @@ ctypedef object[float] mybuffer _ERRORS = u""" -1:23: Syntax error in ctypedef statement +4:23: Syntax error in ctypedef statement """ diff --git a/tests/errors/builtin_type_inheritance.pyx b/tests/errors/builtin_type_inheritance.pyx index bce347ae..c7c02222 100644 --- a/tests/errors/builtin_type_inheritance.pyx +++ b/tests/errors/builtin_type_inheritance.pyx @@ -12,7 +12,7 @@ cdef class MyStr(str): # only in Py2, but can't know that during compilation pass _ERRORS = """ -4:5: inheritance from PyVarObject types like 'tuple' is not currently supported -7:5: inheritance from PyVarObject types like 'bytes' is not currently supported -10:5: inheritance from PyVarObject types like 'str' is not currently supported +5:5: inheritance from PyVarObject types like 'tuple' is not currently supported +8:5: inheritance from PyVarObject types like 'bytes' is not currently supported +11:5: inheritance from PyVarObject types like 'str' is not currently supported """ diff --git a/tests/errors/callargs.pyx b/tests/errors/callargs.pyx index c0970da3..73db3a97 100644 --- a/tests/errors/callargs.pyx +++ b/tests/errors/callargs.pyx @@ -18,5 +18,5 @@ def test(): # too bad we don't get more errors here ... _ERRORS = u""" -8:13: Non-keyword arg following star-arg +10:13: Non-keyword arg following star-arg """ diff --git a/tests/errors/callingnonexisting_T307.pyx b/tests/errors/callingnonexisting_T307.pyx index e1806421..b699326e 100644 --- a/tests/errors/callingnonexisting_T307.pyx +++ b/tests/errors/callingnonexisting_T307.pyx @@ -4,5 +4,5 @@ nonexisting(3, with_kw_arg=4) _ERRORS = u""" -1:11: undeclared name not builtin: nonexisting +4:11: undeclared name not builtin: nonexisting """ diff --git a/tests/errors/cdef_members_T517.pyx b/tests/errors/cdef_members_T517.pyx index a19f8aaa..0b7dfe38 100644 --- a/tests/errors/cdef_members_T517.pyx +++ b/tests/errors/cdef_members_T517.pyx @@ -18,12 +18,12 @@ cdef class Bar: pass _ERRORS = u""" -5:24: C attribute of type 'VoidP' cannot be accessed from Python -5:24: Cannot convert 'VoidP' to Python object -6:24: C attribute of type 'VoidP' cannot be accessed from Python -6:24: Cannot convert 'VoidP' to Python object -6:24: Cannot convert Python object to 'VoidP' -14:22: C attribute of type 'Foo' cannot be accessed from Python -14:22: Cannot convert Python object to 'Foo' +8:24: C attribute of type 'VoidP' cannot be accessed from Python +8:24: Cannot convert 'VoidP' to Python object +9:24: C attribute of type 'VoidP' cannot be accessed from Python +9:24: Cannot convert 'VoidP' to Python object +9:24: Cannot convert Python object to 'VoidP' +17:22: C attribute of type 'Foo' cannot be accessed from Python +17:22: Cannot convert Python object to 'Foo' """ diff --git a/tests/errors/cdef_syntax.pyx b/tests/errors/cdef_syntax.pyx index a59251e1..af2d0d70 100644 --- a/tests/errors/cdef_syntax.pyx +++ b/tests/errors/cdef_syntax.pyx @@ -5,7 +5,7 @@ cdef void cdef nogil class test: pass _ERRORS = u""" - 2: 5: Expected an identifier, found 'pass' - 3: 9: Empty declarator - 4:11: Expected ':', found 'class' +3: 5: Expected an identifier, found 'pass' +4: 9: Empty declarator +5:11: Expected ':', found 'class' """ diff --git a/tests/errors/cdefoptargs.pyx b/tests/errors/cdefoptargs.pyx index b58aebad..ad807c8d 100644 --- a/tests/errors/cdefoptargs.pyx +++ b/tests/errors/cdefoptargs.pyx @@ -7,5 +7,5 @@ cdef b(a, b, c=1, d=2): pass _ERRORS = u""" -2:5:Call with wrong number of arguments (expected at most 4, got 5) +4:5:Call with wrong number of arguments (expected at most 4, got 5) """ diff --git a/tests/errors/cdefspecial.pyx b/tests/errors/cdefspecial.pyx index 3ae588d6..0998856a 100644 --- a/tests/errors/cdefspecial.pyx +++ b/tests/errors/cdefspecial.pyx @@ -8,6 +8,6 @@ cdef class Test: pass _ERRORS = u""" -3:9: Special methods must be declared with 'def', not 'cdef' -6:9: Special methods must be declared with 'def', not 'cdef' +4:9: Special methods must be declared with 'def', not 'cdef' +7:9: Special methods must be declared with 'def', not 'cdef' """ diff --git a/tests/errors/cmethbasematch.pyx b/tests/errors/cmethbasematch.pyx index 6c206ae0..9e309f16 100644 --- a/tests/errors/cmethbasematch.pyx +++ b/tests/errors/cmethbasematch.pyx @@ -9,6 +9,6 @@ cdef class D(C): pass _ERRORS = u""" -6: 9: Signature not compatible with previous declaration -2: 9: Previous declaration is here +8: 9: Signature not compatible with previous declaration +4: 9: Previous declaration is here """ diff --git a/tests/errors/continue_outside_loop.pyx b/tests/errors/continue_outside_loop.pyx index a3ed7d77..8942bbfe 100644 --- a/tests/errors/continue_outside_loop.pyx +++ b/tests/errors/continue_outside_loop.pyx @@ -26,11 +26,11 @@ def bool_result(): return True _ERRORS = u''' -2:0: continue statement not inside loop -5:4: continue statement not inside loop -8:4: continue statement not inside loop -11:4: continue statement not inside loop -16:5: continue statement not inside loop -20:4: continue statement not inside loop -22:4: continue statement not inside loop +3:0: continue statement not inside loop +6:4: continue statement not inside loop +9:4: continue statement not inside loop +12:4: continue statement not inside loop +17:5: continue statement not inside loop +21:4: continue statement not inside loop +23:4: continue statement not inside loop ''' diff --git a/tests/errors/cpdef_syntax.pyx b/tests/errors/cpdef_syntax.pyx index fe89260b..7c608813 100644 --- a/tests/errors/cpdef_syntax.pyx +++ b/tests/errors/cpdef_syntax.pyx @@ -4,7 +4,7 @@ cpdef nogil: pass cpdef nogil class test: pass _ERRORS = u""" - 2: 6: cdef blocks cannot be declared cpdef - 3: 6: cdef blocks cannot be declared cpdef - 3:12: Expected ':', found 'class' +3: 6: cdef blocks cannot be declared cpdef +4: 6: cdef blocks cannot be declared cpdef +4:12: Expected ':', found 'class' """ diff --git a/tests/errors/cpp_no_constructor.pyx b/tests/errors/cpp_no_constructor.pyx index f7d933ee..9bb016d6 100644 --- a/tests/errors/cpp_no_constructor.pyx +++ b/tests/errors/cpp_no_constructor.pyx @@ -9,5 +9,5 @@ cdef extern from *: new Foo(1, 2) _ERRORS = u""" -6:7: no suitable method found +9:7: no suitable method found """ diff --git a/tests/errors/cython3_bytes.pyx b/tests/errors/cython3_bytes.pyx index 768e8b16..7d0c84a0 100644 --- a/tests/errors/cython3_bytes.pyx +++ b/tests/errors/cython3_bytes.pyx @@ -6,5 +6,5 @@ escaped = b'abc\xc3\xbc\xc3\xb6\xc3\xa4' invalid = b'abcüöä' _ERRORS = """ -5:10: bytes can only contain ASCII literal characters. +6:10: bytes can only contain ASCII literal characters. """ diff --git a/tests/errors/declareafteruse_T158.pyx b/tests/errors/declareafteruse_T158.pyx index e5bfbce5..bfcd6ca9 100644 --- a/tests/errors/declareafteruse_T158.pyx +++ b/tests/errors/declareafteruse_T158.pyx @@ -54,24 +54,24 @@ cdef unsigned long long var[100][100] # in 0.11.1 these are warnings FUTURE_ERRORS = u""" -4:13: cdef variable 's' declared after it is used -4:16: cdef variable 'vv' declared after it is used -9:14: cdef variable 'i' declared after it is used -15:14: cdef variable 'i' declared after it is used -21:14: cdef variable 'i' declared after it is used -24:9: cdef variable 's' declared after it is used -30:17: cdef variable 't' declared after it is used -34:13: cdef variable 'r' declared after it is used -40:17: cdef variable 't' declared after it is used -47:10: cdef variable 'baz' declared after it is used -50:24: cdef variable 'var' declared after it is used +6:13: cdef variable 's' declared after it is used +6:16: cdef variable 'vv' declared after it is used +11:14: cdef variable 'i' declared after it is used +17:14: cdef variable 'i' declared after it is used +23:14: cdef variable 'i' declared after it is used +26:9: cdef variable 's' declared after it is used +32:17: cdef variable 't' declared after it is used +36:13: cdef variable 'r' declared after it is used +42:17: cdef variable 't' declared after it is used +49:10: cdef variable 'baz' declared after it is used +52:24: cdef variable 'var' declared after it is used """ syntax error _ERRORS = u""" -40:17: cdef variable 't' declared after it is used -47:10: cdef variable 'baz' declared after it is used -50:24: cdef variable 'var' declared after it is used -67:7: Syntax error in simple statement list +42:17: cdef variable 't' declared after it is used +49:10: cdef variable 'baz' declared after it is used +52:24: cdef variable 'var' declared after it is used +70:7: Syntax error in simple statement list """ diff --git a/tests/errors/def_nogil.pyx b/tests/errors/def_nogil.pyx index f9092d41..16a94cbf 100644 --- a/tests/errors/def_nogil.pyx +++ b/tests/errors/def_nogil.pyx @@ -4,5 +4,5 @@ def test() nogil: pass _ERRORS = """ -2:0: Python function cannot be declared nogil +3:0: Python function cannot be declared nogil """ diff --git a/tests/errors/e2_packedstruct_T290.pyx b/tests/errors/e2_packedstruct_T290.pyx index 12a3ff95..1a0f40f1 100644 --- a/tests/errors/e2_packedstruct_T290.pyx +++ b/tests/errors/e2_packedstruct_T290.pyx @@ -5,5 +5,5 @@ cdef packed foo: pass _ERRORS = u""" -1:12: Expected 'struct', found 'foo' +4:12: Expected 'struct', found 'foo' """ diff --git a/tests/errors/e_addop.pyx b/tests/errors/e_addop.pyx index e8b5aa14..65059156 100644 --- a/tests/errors/e_addop.pyx +++ b/tests/errors/e_addop.pyx @@ -6,5 +6,5 @@ def f(): ptr1 = ptr2 + ptr3 # error _ERRORS = u""" -4:13: Invalid operand types for '+' (int *; int *) +6:13: Invalid operand types for '+' (int *; int *) """ diff --git a/tests/errors/e_argdefault.pyx b/tests/errors/e_argdefault.pyx index 94a2f454..d8828741 100644 --- a/tests/errors/e_argdefault.pyx +++ b/tests/errors/e_argdefault.pyx @@ -12,8 +12,8 @@ cdef class Grail: pass _ERRORS = u""" -1:10: Non-default argument follows default argument -1:36: Non-default argument following default argument -4:23: Non-default argument following default argument -9:16: This argument cannot have a default value +3:10: Non-default argument follows default argument +3:36: Non-default argument following default argument +6:23: Non-default argument following default argument +11:16: This argument cannot have a default value """ diff --git a/tests/errors/e_ass.pyx b/tests/errors/e_ass.pyx index ce5b8a7e..1665971f 100644 --- a/tests/errors/e_ass.pyx +++ b/tests/errors/e_ass.pyx @@ -10,7 +10,7 @@ cdef void foo(obj): obj = p2 # error _ERRORS = u""" -5:16: Cannot assign type 'char *' to 'int' -6:17: Cannot convert Python object to 'int *' -8:17: Cannot convert 'int *' to Python object +7:16: Cannot assign type 'char *' to 'int' +8:17: Cannot convert Python object to 'int *' +10:17: Cannot convert 'int *' to Python object """ diff --git a/tests/errors/e_assnone.pyx b/tests/errors/e_assnone.pyx index f0704ba4..b8e9ba76 100644 --- a/tests/errors/e_assnone.pyx +++ b/tests/errors/e_assnone.pyx @@ -3,5 +3,5 @@ cdef void spam(): None = 42 _ERRORS = u""" -2:1: Cannot assign to or delete this +4:1: Cannot assign to or delete this """ diff --git a/tests/errors/e_autotestdict.pyx b/tests/errors/e_autotestdict.pyx index 44ac57db..a5d56f3d 100644 --- a/tests/errors/e_autotestdict.pyx +++ b/tests/errors/e_autotestdict.pyx @@ -7,5 +7,5 @@ def foo(): pass _ERRORS = u""" -4:0: The autotestdict compiler directive is not allowed in function scope +6:0: The autotestdict compiler directive is not allowed in function scope """ diff --git a/tests/errors/e_badexcvaltype.pyx b/tests/errors/e_badexcvaltype.pyx index 7778cb03..ff2cb1f7 100644 --- a/tests/errors/e_badexcvaltype.pyx +++ b/tests/errors/e_badexcvaltype.pyx @@ -4,6 +4,6 @@ cdef char *spam() except -1: pass _ERRORS = u""" -1:26: Cannot assign type 'long' to 'char *' -1:26: Exception value incompatible with function return type +3:26: Cannot assign type 'long' to 'char *' +3:26: Exception value incompatible with function return type """ diff --git a/tests/errors/e_badfuncargtype.pyx b/tests/errors/e_badfuncargtype.pyx index e6c37439..cece614b 100644 --- a/tests/errors/e_badfuncargtype.pyx +++ b/tests/errors/e_badfuncargtype.pyx @@ -8,7 +8,7 @@ cdef int tomato(Spam s): # incomplete type pass _ERRORS = u""" -3:21: Use spam() rather than spam(void) to declare a function with no arguments. -4:29: Use spam() rather than spam(void) to declare a function with no arguments. -5:16: Argument type 'Spam' is incomplete +5:21: Use spam() rather than spam(void) to declare a function with no arguments. +6:29: Use spam() rather than spam(void) to declare a function with no arguments. +7:16: Argument type 'Spam' is incomplete """ diff --git a/tests/errors/e_badpyparam.pyx b/tests/errors/e_badpyparam.pyx index 401e87f9..576acd79 100644 --- a/tests/errors/e_badpyparam.pyx +++ b/tests/errors/e_badpyparam.pyx @@ -5,5 +5,5 @@ cdef struct Foo def f(Foo *p): pass _ERRORS = u""" -3:6: Cannot convert Python object argument to type 'Foo *' +5:6: Cannot convert Python object argument to type 'Foo *' """ diff --git a/tests/errors/e_badtypeuse.pyx b/tests/errors/e_badtypeuse.pyx index 028bf1bf..23cebd0b 100644 --- a/tests/errors/e_badtypeuse.pyx +++ b/tests/errors/e_badtypeuse.pyx @@ -26,19 +26,19 @@ cdef NoSuchType* ptr ptr = None # This should not produce another error _ERRORS = u""" -3:19: Python object cannot be declared extern -4:16: Array element cannot be a Python object -5:12: Pointer base type cannot be a Python object -7:13: Variable type 'int []' is incomplete -8:11: Variable type 'Grail' is incomplete -9:10: Variable type 'void' is incomplete -11:15: Array element type 'int []' is incomplete -12:14: Array element type 'Grail' is incomplete -13:16: Array element type 'void' is incomplete -16:9: Variable type 'int []' is incomplete +5:19: Python object cannot be declared extern +6:16: Array element cannot be a Python object +7:12: Pointer base type cannot be a Python object +9:13: Variable type 'int []' is incomplete +10:11: Variable type 'Grail' is incomplete +11:10: Variable type 'void' is incomplete +13:15: Array element type 'int []' is incomplete +14:14: Array element type 'Grail' is incomplete +15:16: Array element type 'void' is incomplete +18:9: Variable type 'int []' is incomplete #19:1: Function argument cannot be void -19:1: Use spam() rather than spam(void) to declare a function with no arguments. -18:7: Argument type 'Grail' is incomplete -19:1: Invalid use of 'void' -23:5: 'NoSuchType' is not a type identifier +21:1: Use spam() rather than spam(void) to declare a function with no arguments. +20:7: Argument type 'Grail' is incomplete +21:1: Invalid use of 'void' +25:5: 'NoSuchType' is not a type identifier """ diff --git a/tests/errors/e_bitop.pyx b/tests/errors/e_bitop.pyx index 01addd6e..0ced9edb 100644 --- a/tests/errors/e_bitop.pyx +++ b/tests/errors/e_bitop.pyx @@ -5,5 +5,5 @@ def f(): cdef char *ptr int1 = int2 | ptr # error _ERRORS = u""" -4:13: Invalid operand types for '|' (int; char *) +6:13: Invalid operand types for '|' (int; char *) """ diff --git a/tests/errors/e_boolcoerce.pyx b/tests/errors/e_boolcoerce.pyx index ea732254..36a9b229 100644 --- a/tests/errors/e_boolcoerce.pyx +++ b/tests/errors/e_boolcoerce.pyx @@ -30,15 +30,15 @@ if union_not_boolean: _ERRORS = u""" -5:26: 'struct_type_not_boolean' is not a constant, variable or function identifier -5:26: Type 'struct_type_not_boolean' not acceptable as a boolean +7:26: 'struct_type_not_boolean' is not a constant, variable or function identifier +7:26: Type 'struct_type_not_boolean' not acceptable as a boolean -12:21: 'struct_not_boolean' is not a constant, variable or function identifier -12:21: Type 'struct_not_boolean' not acceptable as a boolean +14:21: 'struct_not_boolean' is not a constant, variable or function identifier +14:21: Type 'struct_not_boolean' not acceptable as a boolean -19:25: 'union_type_not_boolean' is not a constant, variable or function identifier -19:25: Type 'union_type_not_boolean' not acceptable as a boolean +21:25: 'union_type_not_boolean' is not a constant, variable or function identifier +21:25: Type 'union_type_not_boolean' not acceptable as a boolean -26:20: 'union_not_boolean' is not a constant, variable or function identifier -26:20: Type 'union_not_boolean' not acceptable as a boolean +28:20: 'union_not_boolean' is not a constant, variable or function identifier +28:20: Type 'union_not_boolean' not acceptable as a boolean """ diff --git a/tests/errors/e_bufaccess.pyx b/tests/errors/e_bufaccess.pyx index 8caabd17..bc5b9c0f 100644 --- a/tests/errors/e_bufaccess.pyx +++ b/tests/errors/e_bufaccess.pyx @@ -15,9 +15,9 @@ def f(): cdef object[x, 1] buf0 _ERRORS = u""" -1:17: Buffer types only allowed as function local variables -3:21: Buffer types only allowed as function local variables -6:31: "fakeoption" is not a buffer option +3:17: Buffer types only allowed as function local variables +5:21: Buffer types only allowed as function local variables +8:31: "fakeoption" is not a buffer option """ #TODO: #7:22: "ndim" must be non-negative diff --git a/tests/errors/e_bufaccess2.pyx b/tests/errors/e_bufaccess2.pyx index e754a258..943ac5a2 100644 --- a/tests/errors/e_bufaccess2.pyx +++ b/tests/errors/e_bufaccess2.pyx @@ -29,9 +29,9 @@ def withnogil_acquire(x): buf = x _ERRORS = u""" -3:9: 'nothing' is not a type identifier -10:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive -22:11: Cannot access buffer with object dtype without gil -22:11: Assignment of Python object not allowed without gil -27:12: Assignment of Python object not allowed without gil + 3: 9: 'nothing' is not a type identifier +12:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive +24:11: Cannot access buffer with object dtype without gil +24:11: Assignment of Python object not allowed without gil +29:12: Assignment of Python object not allowed without gil """ diff --git a/tests/errors/e_callnonfunction.pyx b/tests/errors/e_callnonfunction.pyx index 50c8cc84..8dab29a0 100644 --- a/tests/errors/e_callnonfunction.pyx +++ b/tests/errors/e_callnonfunction.pyx @@ -16,7 +16,7 @@ cdef int x(): x()() _ERRORS = u""" -2:1: Calling non-function type 'int' -5:1: Calling non-function type 'float' -14:3: Calling non-function type 'int' +4:1: Calling non-function type 'int' +7:1: Calling non-function type 'float' +16:3: Calling non-function type 'int' """ diff --git a/tests/errors/e_callspec.pyx b/tests/errors/e_callspec.pyx index ed95fe13..cd02e6c8 100644 --- a/tests/errors/e_callspec.pyx +++ b/tests/errors/e_callspec.pyx @@ -39,8 +39,8 @@ p4 = h4 #p2 = h4 # fail _ERRORS = u""" -16:22: cannot have both '__stdcall' and '__cdecl' calling conventions -19:23: cannot have both '__fastcall' and '__cdecl' calling conventions +18:22: cannot have both '__stdcall' and '__cdecl' calling conventions +21:23: cannot have both '__fastcall' and '__cdecl' calling conventions """ #31:14: Cannot assign type 'void (__cdecl )(void)' to 'void (*)(void)' #32:14: Cannot assign type 'void (__stdcall )(void)' to 'void (*)(void)' diff --git a/tests/errors/e_cdef_keywords_T241.pyx b/tests/errors/e_cdef_keywords_T241.pyx index 61667e87..3b1355ee 100644 --- a/tests/errors/e_cdef_keywords_T241.pyx +++ b/tests/errors/e_cdef_keywords_T241.pyx @@ -17,6 +17,6 @@ a.some_method(1, 2) a.some_method(1, y=2) _ERRORS = u""" -9:13: Keyword and starred arguments not allowed in cdef functions. -14:13: Keyword and starred arguments not allowed in cdef functions. +12:13: Keyword and starred arguments not allowed in cdef functions. +17:13: Keyword and starred arguments not allowed in cdef functions. """ diff --git a/tests/errors/e_cdef_missing_declarator.pyx b/tests/errors/e_cdef_missing_declarator.pyx index 70983d2b..97e9fde4 100644 --- a/tests/errors/e_cdef_missing_declarator.pyx +++ b/tests/errors/e_cdef_missing_declarator.pyx @@ -5,5 +5,5 @@ cdef int cdef extern from *: void f(int) _ERRORS = u""" -1:8: Empty declarator +3:8: Empty declarator """ diff --git a/tests/errors/e_cdefassign.pyx b/tests/errors/e_cdefassign.pyx index 4bcaa5f9..85335963 100644 --- a/tests/errors/e_cdefassign.pyx +++ b/tests/errors/e_cdefassign.pyx @@ -8,6 +8,6 @@ cdef extern from *: int value = 3 _ERRORS = u""" -2:13: Cannot assign default value to fields in cdef classes, structs or unions -6:12: Cannot assign default value to fields in cdef classes, structs or unions +4:13: Cannot assign default value to fields in cdef classes, structs or unions +8:12: Cannot assign default value to fields in cdef classes, structs or unions """ diff --git a/tests/errors/e_cdefemptysue.pyx b/tests/errors/e_cdefemptysue.pyx index 652bdbd8..f71370f4 100644 --- a/tests/errors/e_cdefemptysue.pyx +++ b/tests/errors/e_cdefemptysue.pyx @@ -9,7 +9,7 @@ ctypedef union eggs: cdef enum ham: pass _ERRORS = u""" -1:5: Empty struct or union definition not allowed outside a 'cdef extern from' block -4:0: Empty struct or union definition not allowed outside a 'cdef extern from' block -7:5: Empty enum definition not allowed outside a 'cdef extern from' block +3:5: Empty struct or union definition not allowed outside a 'cdef extern from' block +6:0: Empty struct or union definition not allowed outside a 'cdef extern from' block +9:5: Empty enum definition not allowed outside a 'cdef extern from' block """ diff --git a/tests/errors/e_cenum.pyx b/tests/errors/e_cenum.pyx index 8915958a..05df9612 100644 --- a/tests/errors/e_cenum.pyx +++ b/tests/errors/e_cenum.pyx @@ -8,5 +8,5 @@ cdef void f(): a = 42 # assignment to non-lvalue _ERRORS = u""" -6:3: Assignment to non-lvalue 'a' +8:3: Assignment to non-lvalue 'a' """ diff --git a/tests/errors/e_cmethbasematch.pyx b/tests/errors/e_cmethbasematch.pyx index 4a415317..45651f90 100644 --- a/tests/errors/e_cmethbasematch.pyx +++ b/tests/errors/e_cmethbasematch.pyx @@ -8,6 +8,6 @@ cdef class D(C): cdef void f(self, int x): pass _ERRORS = u""" -6:6: Signature not compatible with previous declaration -2:6: Previous declaration is here +8:6: Signature not compatible with previous declaration +4:6: Previous declaration is here """ diff --git a/tests/errors/e_cmp.pyx b/tests/errors/e_cmp.pyx index 6c7d5dca..2b6e5e64 100644 --- a/tests/errors/e_cmp.pyx +++ b/tests/errors/e_cmp.pyx @@ -14,7 +14,7 @@ cdef void foo(): bool = 1 in 2 in 3 _ERRORS = u""" - 8:13: Invalid types for '==' (int *, Python object) - 9:13: Invalid types for '==' (int, char *) -10:13: Invalid types for '==' (char *, int *) +10:13: Invalid types for '==' (int *, Python object) +11:13: Invalid types for '==' (int, char *) +12:13: Invalid types for '==' (char *, int *) """ diff --git a/tests/errors/e_cstruct.pyx b/tests/errors/e_cstruct.pyx index bd995bf3..3d4ce9b1 100644 --- a/tests/errors/e_cstruct.pyx +++ b/tests/errors/e_cstruct.pyx @@ -24,10 +24,10 @@ cdef void eggs(Spam s): _ERRORS = u""" -5:36: C struct/union member cannot be a Python object -15:6: Object of type 'Spam' has no attribute 'k' -16:6: Cannot assign type 'float *[42]' to 'int' -17:21: Cannot assign type 'int' to 'float *[42]' -20:7: Cannot select attribute of incomplete type 'Grail' -21:3: Cannot select attribute of incomplete type 'Grail' +7:36: C struct/union member cannot be a Python object +17:6: Object of type 'Spam' has no attribute 'k' +18:6: Cannot assign type 'float *[42]' to 'int' +19:21: Cannot assign type 'int' to 'float *[42]' +22:7: Cannot select attribute of incomplete type 'Grail' +23:3: Cannot select attribute of incomplete type 'Grail' """ diff --git a/tests/errors/e_ctypedefforward.pyx b/tests/errors/e_ctypedefforward.pyx index 2936e5c8..2b992c09 100644 --- a/tests/errors/e_ctypedefforward.pyx +++ b/tests/errors/e_ctypedefforward.pyx @@ -10,5 +10,5 @@ ctypedef struct Spam: ctypedef struct Spam _ERRORS = u""" -1:0: Forward-referenced type must use 'cdef', not 'ctypedef' +3:0: Forward-referenced type must use 'cdef', not 'ctypedef' """ diff --git a/tests/errors/e_ctypedefornot.pyx b/tests/errors/e_ctypedefornot.pyx index 25f2ab94..67563099 100644 --- a/tests/errors/e_ctypedefornot.pyx +++ b/tests/errors/e_ctypedefornot.pyx @@ -14,6 +14,6 @@ cdef Foo f cdef Blarg b _ERRORS = u""" -3:0: 'Foo' previously declared using 'cdef' -9:5: 'Blarg' previously declared using 'ctypedef' +5:0: 'Foo' previously declared using 'cdef' +11:5: 'Blarg' previously declared using 'ctypedef' """ diff --git a/tests/errors/e_declarations.pyx b/tests/errors/e_declarations.pyx index f749f1ce..732fea29 100644 --- a/tests/errors/e_declarations.pyx +++ b/tests/errors/e_declarations.pyx @@ -12,8 +12,8 @@ cdef void f(): _ERRORS = u""" -1:19: Array element cannot be a function -3:18: Function cannot return a function -8:10: Function cannot return a function -8:5: Cannot cast to a function type +3:19: Array element cannot be a function +5:18: Function cannot return a function +10:10: Function cannot return a function +10:5: Cannot cast to a function type """ diff --git a/tests/errors/e_del.pyx b/tests/errors/e_del.pyx index 72e6f1fb..63116b40 100644 --- a/tests/errors/e_del.pyx +++ b/tests/errors/e_del.pyx @@ -13,8 +13,8 @@ def f(a): del x[i] # error: deletion of non-Python object del s.m # error: deletion of non-Python object _ERRORS = u""" -8:6: Cannot assign to or delete this -9:45: Deletion of non-Python, non-C++ object -11:6: Deletion of non-Python, non-C++ object -12:6: Deletion of non-Python, non-C++ object +10:6: Cannot assign to or delete this +11:45: Deletion of non-Python, non-C++ object +13:6: Deletion of non-Python, non-C++ object +14:6: Deletion of non-Python, non-C++ object """ diff --git a/tests/errors/e_directives.pyx b/tests/errors/e_directives.pyx index ad2aabae..a8e57427 100644 --- a/tests/errors/e_directives.pyx +++ b/tests/errors/e_directives.pyx @@ -10,6 +10,6 @@ print 3 # cython: boundscheck = true _ERRORS = u""" -3:0: boundscheck directive must be set to True or False, got 'true' -4:0: boundscheck directive must be set to True or False, got '9' +4:0: boundscheck directive must be set to True or False, got 'true' +5:0: boundscheck directive must be set to True or False, got '9' """ diff --git a/tests/errors/e_exceptclause.pyx b/tests/errors/e_exceptclause.pyx index 25bac3de..3dcb37c0 100644 --- a/tests/errors/e_exceptclause.pyx +++ b/tests/errors/e_exceptclause.pyx @@ -12,6 +12,6 @@ except AttributeError: pass _ERRORS = u""" -8:0: default 'except:' must be last -10:0: default 'except:' must be last +9:0: default 'except:' must be last +11:0: default 'except:' must be last """ diff --git a/tests/errors/e_excvalfunctype.pyx b/tests/errors/e_excvalfunctype.pyx index 8be36a50..9ab2e802 100644 --- a/tests/errors/e_excvalfunctype.pyx +++ b/tests/errors/e_excvalfunctype.pyx @@ -9,6 +9,6 @@ cdef spamfunc spam grail = spam # type mismatch spam = grail # type mismatch _ERRORS = u""" -7:28: Cannot assign type 'spamfunc' to 'grailfunc' -8:28: Cannot assign type 'grailfunc' to 'spamfunc' +9:28: Cannot assign type 'spamfunc' to 'grailfunc' +10:28: Cannot assign type 'grailfunc' to 'spamfunc' """ diff --git a/tests/errors/e_extweakref.pyx b/tests/errors/e_extweakref.pyx index 185b25ca..fc5f3434 100644 --- a/tests/errors/e_extweakref.pyx +++ b/tests/errors/e_extweakref.pyx @@ -15,12 +15,12 @@ cdef void f(): x = c.__weakref__ c.__weakref__ = x _ERRORS = u""" -5:20: Illegal use of special attribute __weakref__ -5:20: Illegal use of special attribute __weakref__ -5:20: Illegal use of special attribute __weakref__ -5:20: Special attribute __weakref__ cannot be exposed to Python -8:22: Illegal use of special attribute __weakref__ -8:22: Special attribute __weakref__ cannot be exposed to Python -13:6: Illegal use of special attribute __weakref__ -14:2: Illegal use of special attribute __weakref__ +7:20: Illegal use of special attribute __weakref__ +7:20: Illegal use of special attribute __weakref__ +7:20: Illegal use of special attribute __weakref__ +7:20: Special attribute __weakref__ cannot be exposed to Python +10:22: Illegal use of special attribute __weakref__ +10:22: Special attribute __weakref__ cannot be exposed to Python +15:6: Illegal use of special attribute __weakref__ +16:2: Illegal use of special attribute __weakref__ """ diff --git a/tests/errors/e_generators.pyx b/tests/errors/e_generators.pyx index af5ca738..d13da55d 100644 --- a/tests/errors/e_generators.pyx +++ b/tests/errors/e_generators.pyx @@ -1,3 +1,5 @@ +# mode: error + def foo(): yield return 0 @@ -12,8 +14,8 @@ class Foo: yield _ERRORS = u""" -3:4: 'return' with argument inside generator -7:4: 'yield' outside function -9:0: 'yield' not supported here -12:4: 'yield' not supported here +5:4: 'return' with argument inside generator +9:4: 'yield' outside function +11:0: 'yield' not supported here +14:4: 'yield' not supported here """ diff --git a/tests/errors/e_index.pyx b/tests/errors/e_index.pyx index 423eb3b8..e32e1a13 100644 --- a/tests/errors/e_index.pyx +++ b/tests/errors/e_index.pyx @@ -9,8 +9,8 @@ def f(obj1, obj2): int1 = int2[int3] # error obj1 = obj2[ptr1] # error _ERRORS = u""" -5:14: Invalid index type 'float' -6:14: Invalid index type 'float *' -7:12: Attempting to index non-array type 'int' -8:17: Cannot convert 'float *' to Python object +7:14: Invalid index type 'float' +8:14: Invalid index type 'float *' +9:12: Attempting to index non-array type 'int' +10:17: Cannot convert 'float *' to Python object """ diff --git a/tests/errors/e_int_literals_py2.py b/tests/errors/e_int_literals_py2.py index f9924fa6..9eef3667 100644 --- a/tests/errors/e_int_literals_py2.py +++ b/tests/errors/e_int_literals_py2.py @@ -10,7 +10,7 @@ def int_literals(): _ERRORS = """ -6:8: illegal integer literal syntax in Python source file 7:8: illegal integer literal syntax in Python source file 8:8: illegal integer literal syntax in Python source file +9:8: illegal integer literal syntax in Python source file """ diff --git a/tests/errors/e_int_literals_py3.py b/tests/errors/e_int_literals_py3.py index b5b49c3f..351fcd06 100644 --- a/tests/errors/e_int_literals_py3.py +++ b/tests/errors/e_int_literals_py3.py @@ -10,9 +10,9 @@ def int_literals(): _ERRORS = """ -4:8: illegal integer literal syntax in Python source file 5:8: illegal integer literal syntax in Python source file 6:8: illegal integer literal syntax in Python source file 7:8: illegal integer literal syntax in Python source file 8:8: illegal integer literal syntax in Python source file +9:8: illegal integer literal syntax in Python source file """ diff --git a/tests/errors/e_multass.pyx b/tests/errors/e_multass.pyx index 1cd99113..2005d5b0 100644 --- a/tests/errors/e_multass.pyx +++ b/tests/errors/e_multass.pyx @@ -5,5 +5,5 @@ def f(obj1a, obj1b): cdef int *ptr2 int1, int3, obj1a = int2, ptr2, obj1b # error _ERRORS = u""" -4:31: Cannot assign type 'int *' to 'int' +6:31: Cannot assign type 'int *' to 'int' """ diff --git a/tests/errors/e_nargs.pyx b/tests/errors/e_nargs.pyx index 500772c7..7cc2a95a 100644 --- a/tests/errors/e_nargs.pyx +++ b/tests/errors/e_nargs.pyx @@ -10,9 +10,9 @@ cdef f(): spam() # too few args spam("blarg") # too few args _ERRORS = u""" -5:6: Call with wrong number of arguments (expected 2, got 0) -6:6: Call with wrong number of arguments (expected 2, got 1) -7:6: Call with wrong number of arguments (expected 2, got 3) -8:5: Call with wrong number of arguments (expected at least 2, got 0) -9:5: Call with wrong number of arguments (expected at least 2, got 1) +7:6: Call with wrong number of arguments (expected 2, got 0) +8:6: Call with wrong number of arguments (expected 2, got 1) +9:6: Call with wrong number of arguments (expected 2, got 3) +10:5: Call with wrong number of arguments (expected at least 2, got 0) +11:5: Call with wrong number of arguments (expected at least 2, got 1) """ diff --git a/tests/errors/e_nogilcmeth.pyx b/tests/errors/e_nogilcmeth.pyx index 6525292c..02ab59b4 100644 --- a/tests/errors/e_nogilcmeth.pyx +++ b/tests/errors/e_nogilcmeth.pyx @@ -5,6 +5,6 @@ cdef class C: pass _ERRORS = u""" -2:6: Signature not compatible with previous declaration 2:12: Previous declaration is here +4: 6: Signature not compatible with previous declaration """ diff --git a/tests/errors/e_nogilfunctype.pyx b/tests/errors/e_nogilfunctype.pyx index f2564750..4ec06c1a 100644 --- a/tests/errors/e_nogilfunctype.pyx +++ b/tests/errors/e_nogilfunctype.pyx @@ -6,5 +6,5 @@ cdef extern from *: fp = f _ERRORS = u""" -5:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil' +7:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil' """ diff --git a/tests/errors/e_nonlocal_T490.pyx b/tests/errors/e_nonlocal_T490.pyx index 0fa7804c..0079df2d 100644 --- a/tests/errors/e_nonlocal_T490.pyx +++ b/tests/errors/e_nonlocal_T490.pyx @@ -28,7 +28,7 @@ def redef_in_class_scope(): _ERRORS = u""" -3:4: no binding for nonlocal 'no_such_name' found + 3:4: no binding for nonlocal 'no_such_name' found 10:8: 'x' redeclared as nonlocal 15:4: no binding for nonlocal 'global_name' found 27:8: 'x' redeclared as nonlocal diff --git a/tests/errors/e_nosignword.pyx b/tests/errors/e_nosignword.pyx index 7bb72a24..a755e25c 100644 --- a/tests/errors/e_nosignword.pyx +++ b/tests/errors/e_nosignword.pyx @@ -9,10 +9,10 @@ cdef unsigned long double j _ERRORS = u""" -1:5: Unrecognised type modifier combination -2:5: Unrecognised type modifier combination 3:5: Unrecognised type modifier combination 4:5: Unrecognised type modifier combination 5:5: Unrecognised type modifier combination 6:5: Unrecognised type modifier combination +7:5: Unrecognised type modifier combination +8:5: Unrecognised type modifier combination """ diff --git a/tests/errors/e_notnone.pyx b/tests/errors/e_notnone.pyx index 3d1e4bf4..25679762 100644 --- a/tests/errors/e_notnone.pyx +++ b/tests/errors/e_notnone.pyx @@ -5,5 +5,5 @@ cdef extern class Grail.Shrubbery cdef void spam(Shrubbery sh not None): pass _ERRORS = u""" -3:15: 'not None' only allowed in Python functions +5:15: 'not None' only allowed in Python functions """ diff --git a/tests/errors/e_notnone2.pyx b/tests/errors/e_notnone2.pyx index 96440771..dd4f85d0 100644 --- a/tests/errors/e_notnone2.pyx +++ b/tests/errors/e_notnone2.pyx @@ -3,6 +3,6 @@ def eggs(int x not None, char* y not None): pass _ERRORS = u""" -1: 9: Only Python type arguments can have 'not None' -1:25: Only Python type arguments can have 'not None' +3: 9: Only Python type arguments can have 'not None' +3:25: Only Python type arguments can have 'not None' """ diff --git a/tests/errors/e_numop.pyx b/tests/errors/e_numop.pyx index 0257b11d..cada3c86 100644 --- a/tests/errors/e_numop.pyx +++ b/tests/errors/e_numop.pyx @@ -5,5 +5,5 @@ def f(): cdef int *ptr int1 = int2 * ptr # error _ERRORS = u""" -4:13: Invalid operand types for '*' (int; int *) +6:13: Invalid operand types for '*' (int; int *) """ diff --git a/tests/errors/e_packedstruct_T290.pyx b/tests/errors/e_packedstruct_T290.pyx index 0ae8776e..cf2df11f 100644 --- a/tests/errors/e_packedstruct_T290.pyx +++ b/tests/errors/e_packedstruct_T290.pyx @@ -6,5 +6,5 @@ cdef extern: char a _ERRORS = u""" -2:9: Cannot declare extern struct as 'packed' +5:9: Cannot declare extern struct as 'packed' """ diff --git a/tests/errors/e_powop.pyx b/tests/errors/e_powop.pyx index 31b6f406..bfef061b 100644 --- a/tests/errors/e_powop.pyx +++ b/tests/errors/e_powop.pyx @@ -7,6 +7,6 @@ def f(): flt1 = flt2 ** str1 # error _ERRORS = u""" -4:13: Invalid operand types for '**' (char *; float) -5:13: Invalid operand types for '**' (float; char *) +6:13: Invalid operand types for '**' (char *; float) +7:13: Invalid operand types for '**' (float; char *) """ diff --git a/tests/errors/e_pxdimpl.pyx b/tests/errors/e_pxdimpl.pyx index d405f1d0..a1e40287 100644 --- a/tests/errors/e_pxdimpl.pyx +++ b/tests/errors/e_pxdimpl.pyx @@ -3,7 +3,7 @@ cimport e_pxdimpl_imported _ERRORS = u""" -6:4: function definition in pxd file must be declared 'cdef inline' + 6:4: function definition in pxd file must be declared 'cdef inline' 18:4: function definition in pxd file must be declared 'cdef inline' 23:8: function definition in pxd file must be declared 'cdef inline' """ diff --git a/tests/errors/e_pyobinstruct.pyx b/tests/errors/e_pyobinstruct.pyx index 7ec74006..c5342f16 100644 --- a/tests/errors/e_pyobinstruct.pyx +++ b/tests/errors/e_pyobinstruct.pyx @@ -9,5 +9,5 @@ def f(): cdef spam s s.parrot = x _ERRORS = u""" -4:8: C struct/union member cannot be a Python object +6:8: C struct/union member cannot be a Python object """ diff --git a/tests/errors/e_return.pyx b/tests/errors/e_return.pyx index 10713c76..21ecb8b4 100644 --- a/tests/errors/e_return.pyx +++ b/tests/errors/e_return.pyx @@ -9,7 +9,7 @@ cdef int h(): return # error return p # error _ERRORS = u""" -3:17: Return with value in void function -7:1: Return value required -8:17: Cannot assign type 'int *' to 'int' +5:17: Return with value in void function +9:1: Return value required +10:17: Cannot assign type 'int *' to 'int' """ diff --git a/tests/errors/e_sizeofincomplete.pyx b/tests/errors/e_sizeofincomplete.pyx index b4ebe907..56e5582b 100644 --- a/tests/errors/e_sizeofincomplete.pyx +++ b/tests/errors/e_sizeofincomplete.pyx @@ -4,5 +4,5 @@ cdef struct unbekannt cdef int n n = sizeof(unbekannt) _ERRORS = u""" -3:4: Cannot take sizeof incomplete type 'unbekannt' +5:4: Cannot take sizeof incomplete type 'unbekannt' """ diff --git a/tests/errors/e_slice.pyx b/tests/errors/e_slice.pyx index ff692167..4a14ba5a 100644 --- a/tests/errors/e_slice.pyx +++ b/tests/errors/e_slice.pyx @@ -17,10 +17,10 @@ for a in int_ptr[2:2:a]: pass _ERRORS = u""" -3:20: Cannot convert 'int *' to Python object -4:21: Cannot convert 'int *' to Python object -5:22: Cannot convert 'int *' to Python object -10:16: C array iteration requires known end index +5:20: Cannot convert 'int *' to Python object +6:21: Cannot convert 'int *' to Python object +7:22: Cannot convert 'int *' to Python object 12:16: C array iteration requires known end index -14:22: C array iteration requires known step size and end index +14:16: C array iteration requires known end index +16:22: C array iteration requires known step size and end index """ diff --git a/tests/errors/e_strcoerce.pyx b/tests/errors/e_strcoerce.pyx index 50d8a45d..515657ea 100644 --- a/tests/errors/e_strcoerce.pyx +++ b/tests/errors/e_strcoerce.pyx @@ -12,8 +12,8 @@ cdef int u3 = u"\xFF" # fails _ERRORS = """ -2:14: Only single-character string literals can be coerced into ints. -3:14: Only single-character string literals can be coerced into ints. -6:15: Only single-character string literals can be coerced into ints. -9:14: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4. +4:14: Only single-character string literals can be coerced into ints. +5:14: Only single-character string literals can be coerced into ints. +8:15: Only single-character string literals can be coerced into ints. +11:14: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4. """ diff --git a/tests/errors/e_subop.pyx b/tests/errors/e_subop.pyx index 4dbe842a..6594d02e 100644 --- a/tests/errors/e_subop.pyx +++ b/tests/errors/e_subop.pyx @@ -6,6 +6,6 @@ def f(): ptr1 = int2 - ptr3 # error ptr1 = ptr2 - ptr3 # error _ERRORS = u""" -4:13: Invalid operand types for '-' (int; char *) -5:13: Cannot assign type 'int' to 'char *' +6:13: Invalid operand types for '-' (int; char *) +7:13: Cannot assign type 'int' to 'char *' """ diff --git a/tests/errors/e_switch.pyx b/tests/errors/e_switch.pyx index 342023dd..ff67d401 100644 --- a/tests/errors/e_switch.pyx +++ b/tests/errors/e_switch.pyx @@ -10,5 +10,5 @@ elif x == 4: print 34 _ERRORS = u""" -3:19: undeclared name not builtin: NONEXISTING +5:19: undeclared name not builtin: NONEXISTING """ diff --git a/tests/errors/e_tempcast.pyx b/tests/errors/e_tempcast.pyx index a68b688a..ff89915e 100644 --- a/tests/errors/e_tempcast.pyx +++ b/tests/errors/e_tempcast.pyx @@ -8,5 +8,5 @@ def foo(obj): p = (obj + blarg) # error - temporary _ERRORS = u""" -6:5: Casting temporary Python object to non-numeric non-Python type +8:5: Casting temporary Python object to non-numeric non-Python type """ diff --git a/tests/errors/e_undefexttype.pyx b/tests/errors/e_undefexttype.pyx index 56e76c57..3a68f8b3 100644 --- a/tests/errors/e_undefexttype.pyx +++ b/tests/errors/e_undefexttype.pyx @@ -3,6 +3,6 @@ cdef class Spam cdef extern class external.Eggs _ERRORS = u""" -1:5: C class 'Spam' is declared but not defined -2:5: C class 'Eggs' is declared but not defined +3:5: C class 'Spam' is declared but not defined +4:5: C class 'Eggs' is declared but not defined """ diff --git a/tests/errors/e_unop.pyx b/tests/errors/e_unop.pyx index 23d2cd9c..302a3e73 100644 --- a/tests/errors/e_unop.pyx +++ b/tests/errors/e_unop.pyx @@ -6,6 +6,6 @@ def f(): int1 = -str2 # error int1 = ~str2 # error _ERRORS = u""" -4:8: Invalid operand type for '-' (char *) -5:8: Invalid operand type for '~' (char *) +6:8: Invalid operand type for '-' (char *) +7:8: Invalid operand type for '~' (char *) """ diff --git a/tests/errors/e_while.pyx b/tests/errors/e_while.pyx index b35c069f..95d2c491 100644 --- a/tests/errors/e_while.pyx +++ b/tests/errors/e_while.pyx @@ -5,6 +5,6 @@ def f(a, b): break # error continue # error _ERRORS = u""" -3:1: break statement not inside loop -4:1: continue statement not inside loop +5:1: break statement not inside loop +6:1: continue statement not inside loop """ diff --git a/tests/errors/encoding.pyx b/tests/errors/encoding.pyx index f7e4a557..2866edc4 100644 --- a/tests/errors/encoding.pyx +++ b/tests/errors/encoding.pyx @@ -1,10 +1,10 @@ -# mode: error # coding=ASCII +# mode: error """ Trs bien. """ _ERRORS = u""" -0:0:Decoding error, missing or incorrect coding= at top of source ('ascii' codec can't decode byte 0x8f in position 22: ordinal not in range(128)) +0:0:Decoding error, missing or incorrect coding= at top of source ('ascii' codec can't decode byte 0x8f in position 36: ordinal not in range(128)) """ diff --git a/tests/errors/extclassattrsetting.pyx b/tests/errors/extclassattrsetting.pyx index bab7b9e2..29182cad 100644 --- a/tests/errors/extclassattrsetting.pyx +++ b/tests/errors/extclassattrsetting.pyx @@ -15,5 +15,5 @@ cdef class ExtClass: _attribute = 5 # FIXME: this is not currently handled!!! _ERRORS = u""" -8:13: Cannot assign default value to fields in cdef classes, structs or unions +10:13: Cannot assign default value to fields in cdef classes, structs or unions """ diff --git a/tests/errors/extended_unpacking.pyx b/tests/errors/extended_unpacking.pyx index 0ff3a61e..eeae7567 100644 --- a/tests/errors/extended_unpacking.pyx +++ b/tests/errors/extended_unpacking.pyx @@ -33,19 +33,19 @@ def types(l): _ERRORS = u""" # syntax1() - 7: 4: can use starred expression only as assignment target - 9: 4: can use starred expression only as assignment target -11: 4: can use starred expression only as assignment target -13: 4: can use starred expression only as assignment target -15: 5: can use starred expression only as assignment target -15: 9: can use starred expression only as assignment target -17:11: can use starred expression only as assignment target -17:24: can use starred expression only as assignment target + 8: 4: can use starred expression only as assignment target +10: 4: can use starred expression only as assignment target +12: 4: can use starred expression only as assignment target +14: 4: can use starred expression only as assignment target +16: 5: can use starred expression only as assignment target +16: 9: can use starred expression only as assignment target +18:11: can use starred expression only as assignment target +18:24: can use starred expression only as assignment target # syntax2() -23:11: more than 1 starred expression in assignment +24:11: more than 1 starred expression in assignment # types() -29:15: Cannot coerce list to type 'int' -30:10: starred target must have Python object (list) type +30:15: Cannot coerce list to type 'int' +31:10: starred target must have Python object (list) type """ diff --git a/tests/errors/extended_unpacking_parser.pyx b/tests/errors/extended_unpacking_parser.pyx index 5546de1a..e362510b 100644 --- a/tests/errors/extended_unpacking_parser.pyx +++ b/tests/errors/extended_unpacking_parser.pyx @@ -23,11 +23,11 @@ def length_recursive(): _ERRORS = u""" - 5:4: too many values to unpack (expected 2, got 3) - 8:4: need more than 1 value to unpack -11:4: need more than 0 values to unpack -14:4: need more than 0 values to unpack -17:4: need more than 0 values to unpack -18:4: need more than 1 value to unpack -21:6: need more than 1 value to unpack +6:4: too many values to unpack (expected 2, got 3) +9:4: need more than 1 value to unpack +12:4: need more than 0 values to unpack +15:4: need more than 0 values to unpack +18:4: need more than 0 values to unpack +19:4: need more than 1 value to unpack +22:6: need more than 1 value to unpack """ diff --git a/tests/errors/extended_unpacking_parser2.pyx b/tests/errors/extended_unpacking_parser2.pyx index fe076b74..13bdc884 100644 --- a/tests/errors/extended_unpacking_parser2.pyx +++ b/tests/errors/extended_unpacking_parser2.pyx @@ -7,6 +7,6 @@ def syntax(): _ERRORS = u""" -5:4: more than 1 starred expression in assignment -5:8: more than 1 starred expression in assignment +6:4: more than 1 starred expression in assignment +6:8: more than 1 starred expression in assignment """ diff --git a/tests/errors/futurebraces.pyx b/tests/errors/futurebraces.pyx index 5a72e6f6..c5cb4d63 100644 --- a/tests/errors/futurebraces.pyx +++ b/tests/errors/futurebraces.pyx @@ -3,5 +3,5 @@ from __future__ import braces _ERRORS = u""" -1:23: not a chance +3:23: not a chance """ diff --git a/tests/errors/invalid_cast.pyx b/tests/errors/invalid_cast.pyx index 05cd0b99..256b96c2 100644 --- a/tests/errors/invalid_cast.pyx +++ b/tests/errors/invalid_cast.pyx @@ -4,5 +4,5 @@ def f(): a = True _ERRORS = u""" -2:9: 'foao' is not a type identifier +4:9: 'foao' is not a type identifier """ diff --git a/tests/errors/invalid_hex_escape0.pyx b/tests/errors/invalid_hex_escape0.pyx index a80d6a5b..7b3a48f8 100644 --- a/tests/errors/invalid_hex_escape0.pyx +++ b/tests/errors/invalid_hex_escape0.pyx @@ -3,5 +3,5 @@ '\x' _ERRORS = ''' -2:1: Invalid hex escape '\x' +3:1: Invalid hex escape '\x' ''' diff --git a/tests/errors/invalid_hex_escape1.pyx b/tests/errors/invalid_hex_escape1.pyx index 80593542..6fe93e13 100644 --- a/tests/errors/invalid_hex_escape1.pyx +++ b/tests/errors/invalid_hex_escape1.pyx @@ -3,5 +3,5 @@ '\x1' _ERRORS = ''' -2:1: Invalid hex escape '\x' +3:1: Invalid hex escape '\x' ''' diff --git a/tests/errors/invalid_uescape.pyx b/tests/errors/invalid_uescape.pyx index e358594b..bc2487a5 100644 --- a/tests/errors/invalid_uescape.pyx +++ b/tests/errors/invalid_uescape.pyx @@ -3,5 +3,5 @@ u'\uXYZ' _ERRORS = ''' -2:2: Invalid unicode escape '\u' +3:2: Invalid unicode escape '\u' ''' diff --git a/tests/errors/invalid_uescape0.pyx b/tests/errors/invalid_uescape0.pyx index 06c2fc40..685f405e 100644 --- a/tests/errors/invalid_uescape0.pyx +++ b/tests/errors/invalid_uescape0.pyx @@ -3,5 +3,5 @@ u'\u' _ERRORS = ''' -2:2: Invalid unicode escape '\u' +3:2: Invalid unicode escape '\u' ''' diff --git a/tests/errors/invalid_uescape2.pyx b/tests/errors/invalid_uescape2.pyx index 59328f69..9a22eb1e 100644 --- a/tests/errors/invalid_uescape2.pyx +++ b/tests/errors/invalid_uescape2.pyx @@ -3,5 +3,5 @@ u'\u12' _ERRORS = ''' -2:2: Invalid unicode escape '\u' +3:2: Invalid unicode escape '\u' ''' diff --git a/tests/errors/literal_lists.pyx b/tests/errors/literal_lists.pyx index 46751d62..2b445c6e 100644 --- a/tests/errors/literal_lists.pyx +++ b/tests/errors/literal_lists.pyx @@ -9,5 +9,5 @@ def false(): return False _ERRORS = u""" -4:10: Literal list must be assigned to pointer at time of declaration +6:10: Literal list must be assigned to pointer at time of declaration """ diff --git a/tests/errors/missing_self_in_cpdef_method_T156.pyx b/tests/errors/missing_self_in_cpdef_method_T156.pyx index 7a3c8b78..21241a22 100644 --- a/tests/errors/missing_self_in_cpdef_method_T156.pyx +++ b/tests/errors/missing_self_in_cpdef_method_T156.pyx @@ -6,5 +6,5 @@ cdef class B: pass _ERRORS = u""" -3:10: C method has no self argument +5:10: C method has no self argument """ diff --git a/tests/errors/missing_self_in_cpdef_method_T165.pyx b/tests/errors/missing_self_in_cpdef_method_T165.pyx index fce40f62..6a95922d 100644 --- a/tests/errors/missing_self_in_cpdef_method_T165.pyx +++ b/tests/errors/missing_self_in_cpdef_method_T165.pyx @@ -6,5 +6,5 @@ cdef class A: pass _ERRORS = u""" -3:10: Self argument (int) of C method 'a' does not match parent type (A) +5:10: Self argument (int) of C method 'a' does not match parent type (A) """ diff --git a/tests/errors/nogil.pyx b/tests/errors/nogil.pyx index f1d318d8..512e1b67 100644 --- a/tests/errors/nogil.pyx +++ b/tests/errors/nogil.pyx @@ -92,71 +92,71 @@ def bare_pyvar_name(object x): # except these: 29, 34, 44, 56, 58, 60, 62-64 _ERRORS = u""" -1:5: Function with Python return type cannot be declared nogil -4:5: Function declared nogil has Python locals or temporaries -6:6: Assignment of Python object not allowed without gil -9:5: Discarding owned Python object not allowed without gil -11:5: Function with Python return type cannot be declared nogil -15:5: Calling gil-requiring function not allowed without gil -24:9: Calling gil-requiring function not allowed without gil -26:12: Assignment of Python object not allowed without gil -28:8: Discarding owned Python object not allowed without gil -28:16: Constructing complex number not allowed without gil -30:8: Backquote expression not allowed without gil +3:5: Function with Python return type cannot be declared nogil +6:5: Function declared nogil has Python locals or temporaries +8:6: Assignment of Python object not allowed without gil +11:5: Discarding owned Python object not allowed without gil +13:5: Function with Python return type cannot be declared nogil +17:5: Calling gil-requiring function not allowed without gil +26:9: Calling gil-requiring function not allowed without gil +28:12: Assignment of Python object not allowed without gil 30:8: Discarding owned Python object not allowed without gil -30:9: Operation not allowed without gil -31:15: Assignment of Python object not allowed without gil -31:15: Operation not allowed without gil -31:15: Python import not allowed without gil -32:8: Operation not allowed without gil -32:13: Python import not allowed without gil -32:25: Constructing Python list not allowed without gil -32:25: Operation not allowed without gil -33:17: Iterating over Python object not allowed without gil -35:11: Discarding owned Python object not allowed without gil -35:11: Indexing Python object not allowed without gil -36:11: Discarding owned Python object not allowed without gil -36:11: Slicing Python object not allowed without gil -37:11: Constructing Python slice object not allowed without gil +30:16: Constructing complex number not allowed without gil +32:8: Backquote expression not allowed without gil +32:8: Discarding owned Python object not allowed without gil +32:9: Operation not allowed without gil +33:15: Assignment of Python object not allowed without gil +33:15: Operation not allowed without gil +33:15: Python import not allowed without gil +34:8: Operation not allowed without gil +34:13: Python import not allowed without gil +34:25: Constructing Python list not allowed without gil +34:25: Operation not allowed without gil +35:17: Iterating over Python object not allowed without gil 37:11: Discarding owned Python object not allowed without gil 37:11: Indexing Python object not allowed without gil -37:13: Converting to Python object not allowed without gil -37:15: Converting to Python object not allowed without gil -37:17: Converting to Python object not allowed without gil -38:11: Accessing Python attribute not allowed without gil 38:11: Discarding owned Python object not allowed without gil -39:9: Constructing Python tuple not allowed without gil -39:9: Discarding owned Python object not allowed without gil -40:8: Constructing Python list not allowed without gil -40:8: Discarding owned Python object not allowed without gil -41:8: Constructing Python dict not allowed without gil -41:8: Discarding owned Python object not allowed without gil -42:12: Discarding owned Python object not allowed without gil -42:12: Truth-testing Python object not allowed without gil -43:13: Python type test not allowed without gil -45:10: Discarding owned Python object not allowed without gil -45:10: Operation not allowed without gil -46:8: Discarding owned Python object not allowed without gil -46:8: Operation not allowed without gil -47:10: Assignment of Python object not allowed without gil -47:14: Assignment of Python object not allowed without gil -48:9: Assignment of Python object not allowed without gil -48:13: Assignment of Python object not allowed without gil -48:16: Creating temporary Python reference not allowed without gil -48:19: Creating temporary Python reference not allowed without gil -49:11: Assignment of Python object not allowed without gil -49:11: Indexing Python object not allowed without gil -50:11: Accessing Python attribute not allowed without gil -50:11: Assignment of Python object not allowed without gil -51:8: Constructing Python tuple not allowed without gil -51:8: Python print statement not allowed without gil -52:8: Deleting Python object not allowed without gil -53:8: Returning Python object not allowed without gil -54:8: Raising exception not allowed without gil -55:14: Truth-testing Python object not allowed without gil -57:17: Truth-testing Python object not allowed without gil -59:8: For-loop using object bounds or target not allowed without gil -61:8: Try-except statement not allowed without gil -65:8: Try-finally statement not allowed without gil -82:8: For-loop using object bounds or target not allowed without gil +38:11: Slicing Python object not allowed without gil +39:11: Constructing Python slice object not allowed without gil +39:11: Discarding owned Python object not allowed without gil +39:11: Indexing Python object not allowed without gil +39:13: Converting to Python object not allowed without gil +39:15: Converting to Python object not allowed without gil +39:17: Converting to Python object not allowed without gil +40:11: Accessing Python attribute not allowed without gil +40:11: Discarding owned Python object not allowed without gil +41:9: Constructing Python tuple not allowed without gil +41:9: Discarding owned Python object not allowed without gil +42:8: Constructing Python list not allowed without gil +42:8: Discarding owned Python object not allowed without gil +43:8: Constructing Python dict not allowed without gil +43:8: Discarding owned Python object not allowed without gil +44:12: Discarding owned Python object not allowed without gil +44:12: Truth-testing Python object not allowed without gil +45:13: Python type test not allowed without gil +47:10: Discarding owned Python object not allowed without gil +47:10: Operation not allowed without gil +48:8: Discarding owned Python object not allowed without gil +48:8: Operation not allowed without gil +49:10: Assignment of Python object not allowed without gil +49:14: Assignment of Python object not allowed without gil +50:9: Assignment of Python object not allowed without gil +50:13: Assignment of Python object not allowed without gil +50:16: Creating temporary Python reference not allowed without gil +50:19: Creating temporary Python reference not allowed without gil +51:11: Assignment of Python object not allowed without gil +51:11: Indexing Python object not allowed without gil +52:11: Accessing Python attribute not allowed without gil +52:11: Assignment of Python object not allowed without gil +53:8: Constructing Python tuple not allowed without gil +53:8: Python print statement not allowed without gil +54:8: Deleting Python object not allowed without gil +55:8: Returning Python object not allowed without gil +56:8: Raising exception not allowed without gil +57:14: Truth-testing Python object not allowed without gil +59:17: Truth-testing Python object not allowed without gil +61:8: For-loop using object bounds or target not allowed without gil +63:8: Try-except statement not allowed without gil +67:8: Try-finally statement not allowed without gil +84:8: For-loop using object bounds or target not allowed without gil """ diff --git a/tests/errors/nogilcmeth.pyx b/tests/errors/nogilcmeth.pyx index b342d997..c2c2cc3c 100644 --- a/tests/errors/nogilcmeth.pyx +++ b/tests/errors/nogilcmeth.pyx @@ -5,6 +5,6 @@ cdef class C: pass _ERRORS = u""" -2:9: Signature not compatible with previous declaration 2:15: Previous declaration is here +4:9: Signature not compatible with previous declaration """ diff --git a/tests/errors/nogilfunctype.pyx b/tests/errors/nogilfunctype.pyx index 7442761b..9baec0c1 100644 --- a/tests/errors/nogilfunctype.pyx +++ b/tests/errors/nogilfunctype.pyx @@ -12,5 +12,5 @@ gp = g fp = f _ERRORS = u""" -10:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil' +12:6: Cannot assign type 'void (void)' to 'void (*)(void) nogil' """ diff --git a/tests/errors/nonconst_def.pyx b/tests/errors/nonconst_def.pyx index abc28be5..4b7c101f 100644 --- a/tests/errors/nonconst_def.pyx +++ b/tests/errors/nonconst_def.pyx @@ -4,6 +4,6 @@ import os DEF ospath = os.path _ERRORS = u""" -2:15: Compile-time name 'os' not defined -2:15: Error in compile-time expression: AttributeError: 'NoneType' object has no attribute 'path' +4:15: Compile-time name 'os' not defined +4:15: Error in compile-time expression: AttributeError: 'NoneType' object has no attribute 'path' """ diff --git a/tests/errors/notcimportedT418.pyx b/tests/errors/notcimportedT418.pyx index f826368b..980d6655 100644 --- a/tests/errors/notcimportedT418.pyx +++ b/tests/errors/notcimportedT418.pyx @@ -6,5 +6,5 @@ import somemod.child cdef somemod.child.something x _ERRORS = u""" -3:5: 'somemod.child' is not a cimported module +6:5: 'somemod.child' is not a cimported module """ diff --git a/tests/errors/py_ucs4_type_errors.pyx b/tests/errors/py_ucs4_type_errors.pyx index 32a0e459..d9ed8255 100644 --- a/tests/errors/py_ucs4_type_errors.pyx +++ b/tests/errors/py_ucs4_type_errors.pyx @@ -18,8 +18,8 @@ def char_too_long_latin1(): _ERRORS = """ - 7:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. -10:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. -13:21: Only single-character string literals can be coerced into ints. -16:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead. + 8:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. +11:21: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. +14:21: Only single-character string literals can be coerced into ints. +17:37: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead. """ diff --git a/tests/errors/py_unicode_type_errors.pyx b/tests/errors/py_unicode_type_errors.pyx index 857f3dc8..47e33489 100644 --- a/tests/errors/py_unicode_type_errors.pyx +++ b/tests/errors/py_unicode_type_errors.pyx @@ -18,8 +18,8 @@ def char_too_long_latin1(): _ERRORS = """ - 7:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. -10:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. -13:24: Only single-character string literals can be coerced into ints. -16:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead. + 8:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. +11:24: Only single-character Unicode string literals or surrogate pairs can be coerced into Py_UCS4/Py_UNICODE. +14:24: Only single-character string literals can be coerced into ints. +17:40: Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead. """ diff --git a/tests/errors/pyobjcastdisallow_T313.pyx b/tests/errors/pyobjcastdisallow_T313.pyx index c3251415..5048719d 100644 --- a/tests/errors/pyobjcastdisallow_T313.pyx +++ b/tests/errors/pyobjcastdisallow_T313.pyx @@ -7,5 +7,5 @@ cdef void* allowed = a cdef double* disallowed = a _ERRORS = u""" -5:26: Python objects cannot be cast to pointers of primitive types +7:26: Python objects cannot be cast to pointers of primitive types """ diff --git a/tests/errors/return_outside_function_T135.pyx b/tests/errors/return_outside_function_T135.pyx index d5e0f462..88772780 100644 --- a/tests/errors/return_outside_function_T135.pyx +++ b/tests/errors/return_outside_function_T135.pyx @@ -31,13 +31,13 @@ else: _ERRORS = u''' - 5:0: Return not inside a function body - 8:4: Return not inside a function body -11:4: Return not inside a function body -13:5: Return not inside a function body -16:5: Return not inside a function body -20:4: Return not inside a function body -23:4: Return not inside a function body -26:4: Return not inside a function body +7:0: Return not inside a function body +10:4: Return not inside a function body +13:4: Return not inside a function body +15:5: Return not inside a function body +18:5: Return not inside a function body +22:4: Return not inside a function body +25:4: Return not inside a function body 28:4: Return not inside a function body +30:4: Return not inside a function body ''' diff --git a/tests/errors/se_badindent.pyx b/tests/errors/se_badindent.pyx index 1b29a845..cf4361d0 100644 --- a/tests/errors/se_badindent.pyx +++ b/tests/errors/se_badindent.pyx @@ -4,5 +4,5 @@ def f(): a = b # space space c = d # space tab _ERRORS = u""" -3:0: Mixed use of tabs and spaces +5:0: Mixed use of tabs and spaces """ diff --git a/tests/errors/se_badindent2.pyx b/tests/errors/se_badindent2.pyx index 3c68d8f6..4288b96a 100644 --- a/tests/errors/se_badindent2.pyx +++ b/tests/errors/se_badindent2.pyx @@ -4,6 +4,6 @@ def f(): a = b c = d _ERRORS = u""" -3:0: Possible inconsistent indentation -3:0: Expected an identifier or literal +5:0: Possible inconsistent indentation +5:0: Expected an identifier or literal """ diff --git a/tests/errors/se_mixtabspace.pyx b/tests/errors/se_mixtabspace.pyx index af28e712..aba75a9e 100644 --- a/tests/errors/se_mixtabspace.pyx +++ b/tests/errors/se_mixtabspace.pyx @@ -4,5 +4,5 @@ def f(): a = b # space space c = d # tab _ERRORS = u""" -3:0: Mixed use of tabs and spaces +5:0: Mixed use of tabs and spaces """ diff --git a/tests/errors/se_multass.pyx b/tests/errors/se_multass.pyx index c53ca02f..cad699e2 100644 --- a/tests/errors/se_multass.pyx +++ b/tests/errors/se_multass.pyx @@ -4,5 +4,5 @@ def f(obj1a, obj2a, obj3a, obj1b, obj2b, obj3b, obj4b): obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b) _ERRORS = u""" -2:9: too many values to unpack (expected 2, got 3) +4:9: too many values to unpack (expected 2, got 3) """ diff --git a/tests/errors/string_assignments.pyx b/tests/errors/string_assignments.pyx index f5484c3a..820d19cc 100644 --- a/tests/errors/string_assignments.pyx +++ b/tests/errors/string_assignments.pyx @@ -51,26 +51,26 @@ cdef list l_f2 = b1 cdef list l_f3 = u1 _ERRORS = u""" -25:20: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4. -26:22: Unicode objects do not support coercion to C types. -27:22: 'str' objects do not support coercion to C types (use 'bytes'?). - -29:20: Cannot convert Unicode string to 'bytes' implicitly, encoding required. -30:22: Cannot convert Unicode string to 'bytes' implicitly, encoding required. -31:22: Cannot convert 'str' to 'bytes' implicitly. This is not portable. - -33:17: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3. -34:19: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3. -35:17: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. -36:19: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. - -38:20: str objects do not support coercion to unicode, use a unicode string literal instead (u'') -39:22: str objects do not support coercion to unicode, use a unicode string literal instead (u'') -40:20: Cannot convert 'bytes' object to unicode implicitly, decoding required -41:22: Cannot convert 'bytes' object to unicode implicitly, decoding required -42:22: Cannot convert 'char*' to unicode implicitly, decoding required - -44:19: Cannot assign type 'str object' to 'tuple object' -45:18: Cannot assign type 'unicode object' to 'tuple object' -46:18: Cannot assign type 'bytes object' to 'tuple object' +26:20: Unicode literals do not support coercion to C types other than Py_UNICODE or Py_UCS4. +27:22: Unicode objects do not support coercion to C types. +28:22: 'str' objects do not support coercion to C types (use 'bytes'?). + +30:20: Cannot convert Unicode string to 'bytes' implicitly, encoding required. +31:22: Cannot convert Unicode string to 'bytes' implicitly, encoding required. +32:22: Cannot convert 'str' to 'bytes' implicitly. This is not portable. + +34:17: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3. +35:19: Cannot convert 'bytes' object to str implicitly. This is not portable to Py3. +36:17: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. +37:19: Cannot convert Unicode string to 'str' implicitly. This is not portable and requires explicit encoding. + +39:20: str objects do not support coercion to unicode, use a unicode string literal instead (u'') +40:22: str objects do not support coercion to unicode, use a unicode string literal instead (u'') +41:20: Cannot convert 'bytes' object to unicode implicitly, decoding required +42:22: Cannot convert 'bytes' object to unicode implicitly, decoding required +43:22: Cannot convert 'char*' to unicode implicitly, decoding required + +45:19: Cannot assign type 'str object' to 'tuple object' +46:18: Cannot assign type 'unicode object' to 'tuple object' +47:18: Cannot assign type 'bytes object' to 'tuple object' """ diff --git a/tests/errors/subtyping_final_class.pyx b/tests/errors/subtyping_final_class.pyx index a2748c0e..05c5a9e9 100644 --- a/tests/errors/subtyping_final_class.pyx +++ b/tests/errors/subtyping_final_class.pyx @@ -10,5 +10,5 @@ cdef class SubType(FinalClass): pass _ERRORS = """ -8:5: Base class 'FinalClass' of type 'SubType' is final +9:5: Base class 'FinalClass' of type 'SubType' is final """ diff --git a/tests/errors/tree_assert.pyx b/tests/errors/tree_assert.pyx index 35beefe4..81ae9a1d 100644 --- a/tests/errors/tree_assert.pyx +++ b/tests/errors/tree_assert.pyx @@ -11,8 +11,8 @@ def test(): _ERRORS = u""" -8:0: Expected path '//ComprehensionNode' not found in result tree -8:0: Expected path '//ComprehensionNode//FuncDefNode' not found in result tree -8:0: Unexpected path '//NameNode' found in result tree -8:0: Unexpected path '//SimpleCallNode' found in result tree +9:0: Expected path '//ComprehensionNode' not found in result tree +9:0: Expected path '//ComprehensionNode//FuncDefNode' not found in result tree +9:0: Unexpected path '//NameNode' found in result tree +9:0: Unexpected path '//SimpleCallNode' found in result tree """ diff --git a/tests/errors/typoT304.pyx b/tests/errors/typoT304.pyx index bf740024..7c736c89 100644 --- a/tests/errors/typoT304.pyx +++ b/tests/errors/typoT304.pyx @@ -5,5 +5,5 @@ def f(): print assert sizeof(int) == sizof(short) == sizeof(long) _ERRORS = u""" -3:10: Expected an identifier or literal +5:10: Expected an identifier or literal """ diff --git a/tests/errors/undefinedname.pyx b/tests/errors/undefinedname.pyx index 8b531e77..4990dde3 100644 --- a/tests/errors/undefinedname.pyx +++ b/tests/errors/undefinedname.pyx @@ -6,6 +6,6 @@ def test(i): return _this_local_name_does_not_exist_ _ERRORS = u""" -1:37:undeclared name not builtin: _this_global_name_does_not_exist_ -4:43:undeclared name not builtin: _this_local_name_does_not_exist_ +3:37:undeclared name not builtin: _this_global_name_does_not_exist_ +6:43:undeclared name not builtin: _this_local_name_does_not_exist_ """ diff --git a/tests/errors/void_as_arg.pyx b/tests/errors/void_as_arg.pyx index 1ae855c2..6122b00e 100644 --- a/tests/errors/void_as_arg.pyx +++ b/tests/errors/void_as_arg.pyx @@ -4,5 +4,5 @@ cdef extern from *: void foo(void) _ERRORS = u""" -2:13:Use spam() rather than spam(void) to declare a function with no arguments. +4:13:Use spam() rather than spam(void) to declare a function with no arguments. """ -- 2.26.2