From 8e991e06802a378ffa9bd1669d6454fb0e08e49f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 28 Jan 2014 03:16:37 +0200 Subject: [PATCH] Add basic array.array test. --- tests/basics/array.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/basics/array.py 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')) +