Commit 7db195ac authored by Stefan Behnel's avatar Stefan Behnel

Py3 test fixes

parent ad56990c
......@@ -12,7 +12,7 @@ True
True
True
an integer is required
Expected tuple, got int
Expected type, got int
"""
def import1():
......@@ -48,13 +48,14 @@ def import4():
def typed_imports():
import sys
import types
cdef long maxunicode
cdef tuple t
cdef type t
from sys import maxunicode
print maxunicode == sys.maxunicode
from sys import version_info as t
print t is sys.version_info
from types import ModuleType as t
print t is types.ModuleType
try:
from sys import version_info as maxunicode
......
......@@ -48,6 +48,10 @@ TypeError: 'int' object is unsubscriptable
>>> test_long_long()
"""
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u'is unsubscriptable', u'is not subscriptable')
def index_tuple(tuple t, int i):
return t[i]
......
"""
__doc__ = u"""
>>> f()
42.0
42.0
......@@ -12,9 +12,13 @@ TypeError: readonly attribute
Traceback (most recent call last):
...
SystemError: bad memberdescr type
"""
import sys
if sys.version_info[0] >= 3:
__doc__ = __doc__.replace(u'TypeError:', u'AttributeError:')
cdef extern from "external_defs.h":
ctypedef float DoubleTypedef
ctypedef float LongDoubleTypedef
......
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