From a3cf886d121907155e2a1f1855f1100cecda66f0 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 18 Jan 2013 10:26:44 +0100 Subject: [PATCH] minor test cleanup --- tests/run/funcexceptchained.pyx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/run/funcexceptchained.pyx b/tests/run/funcexceptchained.pyx index 2788111..ad00b73 100644 --- a/tests/run/funcexceptchained.pyx +++ b/tests/run/funcexceptchained.pyx @@ -1,5 +1,11 @@ +# mode: run +# tag: exceptions + +import sys +IS_PY3 = sys.version_info[0] >= 3 + + __doc__ = u""" ->>> import sys >>> if not IS_PY3: sys.exc_clear() >>> def test_py(outer_exc): @@ -76,9 +82,6 @@ True None """ -import sys - -IS_PY3 = sys.version_info[0] >= 3 def test_c(outer_exc): try: @@ -96,6 +99,7 @@ def test_c(outer_exc): print(sys.exc_info()[0] is AttributeError or sys.exc_info()[0]) print(sys.exc_info()[0] is outer_exc or sys.exc_info()[0]) + def test_c2(): try: raise Exception -- 2.7.4