From: Stefan Behnel Date: Wed, 11 Jun 2008 19:56:35 +0000 (+0200) Subject: new test cases from Pyrex X-Git-Tag: 0.9.8rc1~7^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f714831a635e4bd24b65b4be7cd8466b30307923;p=cython.git new test cases from Pyrex --- diff --git a/tests/errors/se_conddef.pyx b/tests/errors/se_conddef.pyx new file mode 100644 index 00000000..4a703ed8 --- /dev/null +++ b/tests/errors/se_conddef.pyx @@ -0,0 +1,6 @@ +if x: + def h(): + pass +_ERRORS = u""" +/Local/Projects/D/Pyrex/Source/Tests/Errors1/se_conddef.pyx:2:1: def statement not allowed here +""" diff --git a/tests/errors/se_mixtabspace.pyx b/tests/errors/se_mixtabspace.pyx new file mode 100644 index 00000000..05fe4469 --- /dev/null +++ b/tests/errors/se_mixtabspace.pyx @@ -0,0 +1,6 @@ +def f(): + a = b # space space + c = d # tab +_ERRORS = u""" +/Local/Projects/D/Pyrex/Source/Tests/Errors1/se_mixtabspace.pyx:3:0: Mixed use of tabs and spaces +""" diff --git a/tests/errors/se_multass.pyx b/tests/errors/se_multass.pyx new file mode 100644 index 00000000..5e192040 --- /dev/null +++ b/tests/errors/se_multass.pyx @@ -0,0 +1,6 @@ +def f(obj1a, obj2a, obj3a, obj1b, obj2b, obj3b, obj4b): + obj1a, (obj2a, obj3a) = obj1b, (obj2b, obj3b, obj4b) + +_ERRORS = u""" +2:9: Unpacking sequence of wrong size (expected 2, got 3) +""" diff --git a/tests/errors/se_nestdef.pyx b/tests/errors/se_nestdef.pyx new file mode 100644 index 00000000..c23c3caf --- /dev/null +++ b/tests/errors/se_nestdef.pyx @@ -0,0 +1,6 @@ +def f(): + def g(): + pass +_ERRORS = u""" +/Local/Projects/D/Pyrex/Source/Tests/Errors1/se_nestdef.pyx:2:1: def statement not allowed here +"""