[pypy-commit] pypy default: py3 compat
pjenvey
pypy.commits at gmail.com
Sun Oct 9 23:00:49 EDT 2016
Author: Philip Jenvey <pjenvey at underboss.org>
Branch:
Changeset: r87684:2fa8ddb56cfa
Date: 2016-10-09 19:59 -0700
http://bitbucket.org/pypy/pypy/changeset/2fa8ddb56cfa/
Log: py3 compat
diff --git a/pypy/interpreter/test/test_zzpickle_and_slow.py b/pypy/interpreter/test/test_zzpickle_and_slow.py
--- a/pypy/interpreter/test/test_zzpickle_and_slow.py
+++ b/pypy/interpreter/test/test_zzpickle_and_slow.py
@@ -370,10 +370,10 @@
def test_pickle_reversesequenceiter_stopped(self):
import pickle
iter = reversed([])
- raises(StopIteration, iter.next)
+ raises(StopIteration, next, iter)
pckl = pickle.dumps(iter)
result = pickle.loads(pckl)
- raises(StopIteration, result.next)
+ raises(StopIteration, next, result)
# This test used to be marked xfail and it tried to test for the past
# support of pickling dictiter objects.
@@ -405,10 +405,10 @@
raise IndexError
for it in (), IE():
iter = reversed(it)
- raises(StopIteration, iter.next)
+ raises(StopIteration, next, iter)
pckl = pickle.dumps(iter)
result = pickle.loads(pckl)
- raises(StopIteration, result.next)
+ raises(StopIteration, next, result)
def test_pickle_enum(self):
import pickle
diff --git a/pypy/objspace/std/test/test_iterobject.py b/pypy/objspace/std/test/test_iterobject.py
--- a/pypy/objspace/std/test/test_iterobject.py
+++ b/pypy/objspace/std/test/test_iterobject.py
@@ -106,8 +106,8 @@
n = 10
d = range(n)
it = reversed(d)
- it.next()
- it.next()
+ next(it)
+ next(it)
assert it.__length_hint__() == n-2
d.append(n)
assert it.__length_hint__() == n-2
More information about the pypy-commit
mailing list