summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/bytearray_construct_array.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-09 00:07:19 +0100
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-03-09 00:07:19 +0100
commit983144404b6526c22e5c4224807ea4214e11e248 (patch)
tree9e574044f0a16eba13b20110eb73c4537a07a868 /tests/basics/bytearray_construct_array.py
parent52b6764894755324db036731ae1d6ec77172419a (diff)
downloadmicropython-983144404b6526c22e5c4224807ea4214e11e248.tar.gz
micropython-983144404b6526c22e5c4224807ea4214e11e248.zip
tests/basic: Make various tests skippable.
Diffstat (limited to 'tests/basics/bytearray_construct_array.py')
-rw-r--r--tests/basics/bytearray_construct_array.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/bytearray_construct_array.py b/tests/basics/bytearray_construct_array.py
new file mode 100644
index 0000000000..6d45cafda3
--- /dev/null
+++ b/tests/basics/bytearray_construct_array.py
@@ -0,0 +1,11 @@
+# test construction of bytearray from different objects
+try:
+ from array import array
+except ImportError:
+ import sys
+ print("SKIP")
+ sys.exit()
+
+# arrays
+print(bytearray(array('b', [1, 2])))
+print(bytearray(array('h', [0x101, 0x202])))