summaryrefslogtreecommitdiff
path: root/tests/run/bytearray_iter.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/bytearray_iter.py')
-rw-r--r--tests/run/bytearray_iter.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/run/bytearray_iter.py b/tests/run/bytearray_iter.py
index 1865f057b..60df9fcc1 100644
--- a/tests/run/bytearray_iter.py
+++ b/tests/run/bytearray_iter.py
@@ -88,3 +88,18 @@ def modifying_reversed_bytearray_iter(x):
for a in reversed(x):
print(chr(a))
del x[0]
+
+# ticket: 3473
+
+def test_bytearray_iteration(src):
+ """
+ >>> src = b'123'
+ >>> test_bytearray_iteration(src)
+ 49
+ 50
+ 51
+ """
+
+ data = bytearray(src)
+ for elem in data:
+ print(elem)