Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: py3.5
Changeset: r96038:1c54055fec69
Date: 2019-02-17 12:53 +0100
http://bitbucket.org/pypy/pypy/changeset/1c54055fec69/
Log: merge default
diff --git a/pypy/objspace/std/iterobject.py b/pypy/objspace/std/iterobject.py
--- a/pypy/objspace/std/iterobject.py
+++ b/pypy/objspace/std/iterobject.py
@@ -124,6 +124,7 @@
end = rutf8.next_codepoint_pos(w_seq._utf8, start)
w_res = W_UnicodeObject(w_seq._utf8[start:end], 1)
self.byteindex = end
+ self.index += 1
return w_res
diff --git a/pypy/objspace/std/test/test_unicodeobject.py
b/pypy/objspace/std/test/test_unicodeobject.py
--- a/pypy/objspace/std/test/test_unicodeobject.py
+++ b/pypy/objspace/std/test/test_unicodeobject.py
@@ -45,6 +45,7 @@
w_iter = space.iter(w_uni)
w_char1 = w_iter.descr_next(space)
w_char2 = w_iter.descr_next(space)
+ py.test.raises(OperationError, w_iter.descr_next, space)
assert w_uni._index_storage is old_index_storage
assert space.eq_w(w_char1, w_uni._getitem_result(space, 0))
assert space.eq_w(w_char2, w_uni._getitem_result(space, 1))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit