diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-28 23:12:35 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-28 23:12:35 +0000 |
commit | b40892d266c05613f3e32f12ca3a7c4b03270fb7 (patch) | |
tree | 4f5305322fd63e7139e122ce8ea6b69cf180c16d /tests/basics/array1.py | |
parent | 8bf91f2a87b8f81e3a5d3a0f986b6e884b737b6a (diff) |
Rename array test to array1 so it doesn't clash with array module.
On my machine, 'import array' in CPython tries to load the array test.
Diffstat (limited to 'tests/basics/array1.py')
-rw-r--r-- | tests/basics/array1.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/array1.py b/tests/basics/array1.py new file mode 100644 index 000000000..6f70fdb91 --- /dev/null +++ b/tests/basics/array1.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')) + |