From c416c7cb2159cc43f9461d96721aeaaa8f9f4714 Mon Sep 17 00:00:00 2001 From: Kenrick Everett <31653115+Kenrick0@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:18:12 +1000 Subject: Fix bytearray iteration in 0.29.x (#4108) By explicitly setting the result type --- tests/run/bytearray_iter.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/run/bytearray_iter.py (limited to 'tests/run/bytearray_iter.py') diff --git a/tests/run/bytearray_iter.py b/tests/run/bytearray_iter.py new file mode 100644 index 000000000..4beb8e285 --- /dev/null +++ b/tests/run/bytearray_iter.py @@ -0,0 +1,15 @@ +# mode: run +# 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) -- cgit v1.2.1