From: Stefan Behnel Date: Fri, 21 Aug 2009 10:35:16 +0000 (+0200) Subject: Py3 test fixes X-Git-Tag: 0.12.alpha0~236 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0a422d408e9ff18406e44daf25e2a9eda0e64235;p=cython.git Py3 test fixes --- diff --git a/tests/run/extended_unpacking_T235.pyx b/tests/run/extended_unpacking_T235.pyx index e4f1eefb..1821ad01 100644 --- a/tests/run/extended_unpacking_T235.pyx +++ b/tests/run/extended_unpacking_T235.pyx @@ -1,7 +1,7 @@ __doc__ = u""" >>> class FakeSeq(object): ... def __init__(self, length): -... self._values = range(1,length+1) +... self._values = list(range(1,length+1)) ... def __getitem__(self, i): ... return self._values[i] @@ -165,10 +165,10 @@ ValueError: need more than 1 value to unpack >>> unpack_middle_tuple((1,2,3)) (1, [2], 3) ->>> a,b,c = unpack_middle(range(100)) +>>> a,b,c = unpack_middle(list(range(100))) >>> a, len(b), c (0, 98, 99) ->>> a,b,c = unpack_middle_list(range(100)) +>>> a,b,c = unpack_middle_list(list(range(100))) >>> a, len(b), c (0, 98, 99) >>> a,b,c = unpack_middle_tuple(tuple(range(100))) diff --git a/tests/run/hash_T326.pyx b/tests/run/hash_T326.pyx index bd850e98..6ee1f353 100644 --- a/tests/run/hash_T326.pyx +++ b/tests/run/hash_T326.pyx @@ -21,7 +21,7 @@ cdef class A: self.a = a def __hash__(self): if self.a == 100: - raise TypeError, "That's kind of a round number..." + raise TypeError, u"That's kind of a round number..." else: return self.a