From e199017f63a0259068074fd40002718f6603a2fc Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 26 Oct 2008 18:26:42 +0100 Subject: [PATCH] use unicode strings for compiler error tests (just for consistency) --- tests/errors/cdefoptargs.pyx | 2 +- tests/errors/e_pxdimpl.pyx | 4 ++-- tests/errors/e_strcoerce.pyx | 2 +- tests/errors/e_switch.pyx | 2 +- tests/errors/encoding.pyx | 2 +- tests/errors/futurebraces.pyx | 2 +- tests/errors/invalid_cast.pyx | 4 ++-- tests/errors/undefinedname.pyx | 2 +- tests/errors/void_as_arg.pyx | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/errors/cdefoptargs.pyx b/tests/errors/cdefoptargs.pyx index c7ac4804..858c7fd9 100644 --- a/tests/errors/cdefoptargs.pyx +++ b/tests/errors/cdefoptargs.pyx @@ -4,6 +4,6 @@ def call5(): cdef b(a, b, c=1, d=2): pass -_ERRORS = """ +_ERRORS = u""" 2:5:Call with wrong number of arguments (expected at most 4, got 5) """ diff --git a/tests/errors/e_pxdimpl.pyx b/tests/errors/e_pxdimpl.pyx index b8452b66..bfa60b0a 100644 --- a/tests/errors/e_pxdimpl.pyx +++ b/tests/errors/e_pxdimpl.pyx @@ -1,7 +1,7 @@ cimport e_pxdimpl_imported -_ERRORS = """ -6:4: function definition not allowed here +_ERRORS = u""" +6:4: function definition not allowed here 18:4: function definition not allowed here 23:8: function definition not allowed here """ diff --git a/tests/errors/e_strcoerce.pyx b/tests/errors/e_strcoerce.pyx index c8a508a7..89968d76 100644 --- a/tests/errors/e_strcoerce.pyx +++ b/tests/errors/e_strcoerce.pyx @@ -2,7 +2,7 @@ cdef int c1 = "t" # works cdef int c2 = "te" # fails cdef int cx = "test" # fails -_ERRORS = """ +_ERRORS = u""" 2:14: Only coerce single-character ascii strings can be used as ints. 3:14: Only coerce single-character ascii strings can be used as ints. """ diff --git a/tests/errors/e_switch.pyx b/tests/errors/e_switch.pyx index 9d0b4453..f75d1782 100644 --- a/tests/errors/e_switch.pyx +++ b/tests/errors/e_switch.pyx @@ -7,6 +7,6 @@ elif x == 2: elif x == 4: print 34 -_ERRORS = """ +_ERRORS = u""" 3:19: undeclared name not builtin: NONEXISTING """ diff --git a/tests/errors/encoding.pyx b/tests/errors/encoding.pyx index d0c7fbe5..4460cf5c 100644 --- a/tests/errors/encoding.pyx +++ b/tests/errors/encoding.pyx @@ -4,6 +4,6 @@ Trs bien. """ -_ERRORS = """ +_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)) """ diff --git a/tests/errors/futurebraces.pyx b/tests/errors/futurebraces.pyx index f4c8a36b..850036bb 100644 --- a/tests/errors/futurebraces.pyx +++ b/tests/errors/futurebraces.pyx @@ -1,5 +1,5 @@ from __future__ import braces -_ERRORS = """ +_ERRORS = u""" 1:23: not a chance """ diff --git a/tests/errors/invalid_cast.pyx b/tests/errors/invalid_cast.pyx index 840ed344..3bce8b02 100644 --- a/tests/errors/invalid_cast.pyx +++ b/tests/errors/invalid_cast.pyx @@ -1,6 +1,6 @@ def f(): a = True -_ERRORS = """ +_ERRORS = u""" 2:9: 'foao' is not a type identifier -""" \ No newline at end of file +""" diff --git a/tests/errors/undefinedname.pyx b/tests/errors/undefinedname.pyx index 4258f4b5..a18645ff 100644 --- a/tests/errors/undefinedname.pyx +++ b/tests/errors/undefinedname.pyx @@ -3,7 +3,7 @@ i = _this_global_name_does_not_exist_ def test(i): return _this_local_name_does_not_exist_ -_ERRORS = """ +_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_ """ diff --git a/tests/errors/void_as_arg.pyx b/tests/errors/void_as_arg.pyx index 23717f1c..7736ae92 100644 --- a/tests/errors/void_as_arg.pyx +++ b/tests/errors/void_as_arg.pyx @@ -1,6 +1,6 @@ cdef extern from *: void foo(void) -_ERRORS = """ +_ERRORS = u""" 2:13:Use spam() rather than spam(void) to declare a function with no arguments. """ -- 2.26.2