From f714831a635e4bd24b65b4be7cd8466b30307923 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 11 Jun 2008 21:56:35 +0200 Subject: [PATCH] new test cases from Pyrex --- tests/errors/se_conddef.pyx | 6 ++++++ tests/errors/se_mixtabspace.pyx | 6 ++++++ tests/errors/se_multass.pyx | 6 ++++++ tests/errors/se_nestdef.pyx | 6 ++++++ 4 files changed, 24 insertions(+) create mode 100644 tests/errors/se_conddef.pyx create mode 100644 tests/errors/se_mixtabspace.pyx create mode 100644 tests/errors/se_multass.pyx create mode 100644 tests/errors/se_nestdef.pyx 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 +""" -- 2.26.2