From b40892d266c05613f3e32f12ca3a7c4b03270fb7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 28 Jan 2014 23:12:35 +0000 Subject: 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. --- tests/basics/array1.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/basics/array1.py (limited to 'tests/basics/array1.py') 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')) + -- cgit v1.2.3