diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-28 22:29:51 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-01-28 22:29:51 +0200 |
commit | 57aebe171459fd599f8d430c1ea1660ed307360c (patch) | |
tree | 42bf577b13e01a3720361ebb2b887e4c2e736c94 /tests | |
parent | bbd9251bac5bf7e2c2055a8b17172b46e7ff8cd0 (diff) | |
download | micropython-57aebe171459fd599f8d430c1ea1660ed307360c.tar.gz micropython-57aebe171459fd599f8d430c1ea1660ed307360c.zip |
tests: Add testcase for bytes() on values in range 128-255.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basics/bytes.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/bytes.py b/tests/basics/bytes.py index 8f29175506..ca0594a259 100644 --- a/tests/basics/bytes.py +++ b/tests/basics/bytes.py @@ -37,3 +37,9 @@ print(bytes(range(5))) x = b"\xff\x8e\xfe}\xfd\x7f" print(len(x)) print(x[0], x[1], x[2], x[3]) + +# Make sure init values are not mistreated as unicode chars +# For sequence of known len +print(bytes([128, 255])) +# For sequence of unknown len +print(bytes(iter([128, 255]))) |