diff options
author | Kenrick Everett <31653115+Kenrick0@users.noreply.github.com> | 2022-06-21 16:18:12 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 07:18:12 +0100 |
commit | c416c7cb2159cc43f9461d96721aeaaa8f9f4714 (patch) | |
tree | 05874ec7153e372d558cf94a5a4b7b102479eb58 /tests/run/bytearray_iter.py | |
parent | a7d98eeafac9aaaa8825fd471be38172ee0b259c (diff) | |
download | cython-c416c7cb2159cc43f9461d96721aeaaa8f9f4714.tar.gz |
Fix bytearray iteration in 0.29.x (#4108)
By explicitly setting the result type
Diffstat (limited to 'tests/run/bytearray_iter.py')
-rw-r--r-- | tests/run/bytearray_iter.py | 15 |
1 files changed, 15 insertions, 0 deletions
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) |