diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-28 03:16:37 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-28 03:19:32 +0200 |
commit | 8e991e06802a378ffa9bd1669d6454fb0e08e49f (patch) | |
tree | 81ebe117be2b6834920d3e886d5b6cfb9462f5b7 /tests | |
parent | 7e652af242ca7afaafd611252fc33bc5682a6680 (diff) | |
download | micropython-8e991e06802a378ffa9bd1669d6454fb0e08e49f.tar.gz micropython-8e991e06802a378ffa9bd1669d6454fb0e08e49f.zip |
Add basic array.array test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basics/array.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/array.py b/tests/basics/array.py new file mode 100644 index 0000000000..6f70fdb911 --- /dev/null +++ b/tests/basics/array.py @@ -0,0 +1,13 @@ +import array + +a = array.array('B', [1, 2, 3]) +print(a, len(a)) +i = array.array('I', [1, 2, 3]) +print(i, len(i)) +print(a[0]) +print(i[-1]) + +# Empty arrays +print(len(array.array('h'))) +print(array.array('i')) + |