Commit f313e646 authored by Stefan Behnel's avatar Stefan Behnel

minor test cleanups

parent e2f54075
__doc__ = u""" __doc__ = """
>>> try: >>> try:
... s = Spam() ... s = Spam()
... except KeyError, e: ... except KeyError, e:
... print("Exception: %s" % e) ... print("Exception: %s" % e)
... else: ... else:
... print("Did not raise the expected exception") ... print("Did not raise the expected exception")
Exception: u'This is not a spanish inquisition' Exception: 'This is not a spanish inquisition'
""" """
import sys import sys
if sys.version_info[0] >= 3: if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u"Error, e", u"Error as e") __doc__ = __doc__.replace("Error, e", "Error as e")
__doc__ = __doc__.replace(u" u'", u" '")
cdef extern from "Python.h": cdef extern from "Python.h":
ctypedef class __builtin__.list [object PyListObject]: ctypedef class __builtin__.list [object PyListObject]:
...@@ -19,4 +18,4 @@ cdef extern from "Python.h": ...@@ -19,4 +18,4 @@ cdef extern from "Python.h":
cdef class Spam(list): cdef class Spam(list):
def __init__(self): def __init__(self):
raise KeyError(u"This is not a spanish inquisition") raise KeyError("This is not a spanish inquisition")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment