summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-10-30 23:58:08 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-10-31 00:03:53 +0200
commite62a0fe36776f039149e7fab77323aa380b97c2e (patch)
treeccc4552c55bcc250365c3347c662ab5ecf72161f /tests/basics
parent31619cc5893b8066799e663683ea9a7ea29602e1 (diff)
downloadmicropython-e62a0fe36776f039149e7fab77323aa380b97c2e.tar.gz
micropython-e62a0fe36776f039149e7fab77323aa380b97c2e.zip
objstr: Allow to convert any buffer proto object to str.
Original motivation is to support converting bytearrays, but easier to just support buffer protocol at all.
Diffstat (limited to 'tests/basics')
-rw-r--r--tests/basics/bytearray1.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/bytearray1.py b/tests/basics/bytearray1.py
index d8e669506b..76e7e59753 100644
--- a/tests/basics/bytearray1.py
+++ b/tests/basics/bytearray1.py
@@ -18,6 +18,8 @@ print(a[1:])
print(a[:-1])
print(a[2:3])
+print(str(bytearray(b"123"), "utf-8"))
+
# Comparisons
print(bytearray([1]) == bytearray([1]))
print(bytearray([1]) == bytearray([2]))