From 0a422d408e9ff18406e44daf25e2a9eda0e64235 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 21 Aug 2009 12:35:16 +0200 Subject: [PATCH] Py3 test fixes --- tests/run/extended_unpacking_T235.pyx | 6 +++--- tests/run/hash_T326.pyx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.26.2