From 42a200486ca1c78202a7a24bbbabffea58417441 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 15 May 2008 11:35:28 +0200 Subject: [PATCH] test fix --- tests/run/r_hordijk1.pyx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/run/r_hordijk1.pyx b/tests/run/r_hordijk1.pyx index 3786dd53..5f4ab150 100644 --- a/tests/run/r_hordijk1.pyx +++ b/tests/run/r_hordijk1.pyx @@ -1,21 +1,22 @@ __doc__ = u""" >>> try: ... s = Spam() - ... except StandardError, e: + ... except KeyError, e: ... print("Exception: %s" % e) ... else: ... print("Did not raise the expected exception") - Exception: This is not a spanish inquisition + Exception: u'This is not a spanish inquisition' """ import sys if sys.version_info[0] >= 3: - __doc__ = __doc__.replace(u"Exception, e", u"Exception as e") + __doc__ = __doc__.replace(u"Error, e", u"Error as e") + __doc__ = __doc__.replace(u" u'", u" '") cdef extern from "Python.h": - ctypedef class types.ListType [object PyListObject]: + ctypedef class __builtin__.list [object PyListObject]: pass -cdef class Spam(ListType): +cdef class Spam(list): def __init__(self): - raise StandardError("This is not a spanish inquisition") + raise KeyError(u"This is not a spanish inquisition") -- 2.26.2