Philip Jenvey avatar Philip Jenvey committed 48383cc

2to3

Comments (0)

Files changed (1)

pypy/interpreter/test/test_zzpickle_and_slow.py

                 yield 42 + i
         g = f(4)
         g2 = copy.deepcopy(g)
-        res = g.next()
+        res = next(g)
         assert res == 42
-        res = g2.next()
+        res = next(g2)
         assert res == 42
         g3 = copy.deepcopy(g)
-        res = g.next()
+        res = next(g)
         assert res == 43
-        res = g2.next()
+        res = next(g2)
         assert res == 43
-        res = g3.next()
+        res = next(g3)
         assert res == 43
 
     def test_shallowcopy_generator(self):
                 n -= 1
         g = f(2)
         g2 = copy.copy(g)
-        res = g.next()
+        res = next(g)
         assert res == 44
-        res = g2.next()
+        res = next(g2)
         assert res == 44
         g3 = copy.copy(g)
-        res = g.next()
+        res = next(g)
         assert res == 43
-        res = g2.next()
+        res = next(g2)
         assert res == 43
-        res = g3.next()
+        res = next(g3)
         assert res == 43
         g4 = copy.copy(g2)
         for i in range(2):
-            raises(StopIteration, g.next)
-            raises(StopIteration, g2.next)
-            raises(StopIteration, g3.next)
-            raises(StopIteration, g4.next)
+            raises(StopIteration, next, g)
+            raises(StopIteration, next, g2)
+            raises(StopIteration, next, g3)
+            raises(StopIteration, next, g4)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.