Skip to content

Commit 30e2517

Browse files
committed
tests: Rename "array" module to "uarray".
1 parent a2eea57 commit 30e2517

26 files changed

Lines changed: 152 additions & 63 deletions

tests/basics/array1.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
try:
2-
import array
2+
import uarray as array
33
except ImportError:
4-
print("SKIP")
5-
raise SystemExit
4+
try:
5+
import array
6+
except ImportError:
7+
print("SKIP")
8+
raise SystemExit
69

710
a = array.array('B', [1, 2, 3])
811
print(a, len(a))

tests/basics/array_add.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# test array + array
22
try:
3-
import array
3+
import uarray as array
44
except ImportError:
5-
print("SKIP")
6-
raise SystemExit
5+
try:
6+
import array
7+
except ImportError:
8+
print("SKIP")
9+
raise SystemExit
710

811
a1 = array.array('I', [1])
912
a2 = array.array('I', [2])

tests/basics/array_construct.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# test construction of array.array from different objects
22

33
try:
4-
from array import array
4+
from uarray import array
55
except ImportError:
6-
print("SKIP")
7-
raise SystemExit
6+
try:
7+
from array import array
8+
except ImportError:
9+
print("SKIP")
10+
raise SystemExit
811

912
# tuple, list
1013
print(array('b', (1, 2)))

tests/basics/array_construct2.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
try:
2-
from array import array
2+
from uarray import array
33
except ImportError:
4-
print("SKIP")
5-
raise SystemExit
4+
try:
5+
from array import array
6+
except ImportError:
7+
print("SKIP")
8+
raise SystemExit
69

710
# construct from something with unknown length (requires generators)
811
print(array('i', (i for i in range(10))))
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# test construction of array.array from different objects
22

33
try:
4-
from array import array
4+
from uarray import array
55
except ImportError:
6-
print("SKIP")
7-
raise SystemExit
6+
try:
7+
from array import array
8+
except ImportError:
9+
print("SKIP")
10+
raise SystemExit
811

912
# raw copy from bytes, bytearray
1013
print(array('h', b'12'))

tests/basics/array_intbig.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# test array types QqLl that require big-ints
22

33
try:
4-
from array import array
4+
from uarray import array
55
except ImportError:
6-
print("SKIP")
7-
raise SystemExit
6+
try:
7+
from array import array
8+
except ImportError:
9+
print("SKIP")
10+
raise SystemExit
811

912
print(array('L', [0, 2**32-1]))
1013
print(array('l', [-2**31, 0, 2**31-1]))

tests/basics/array_micropython.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# test MicroPython-specific features of array.array
22
try:
3-
import array
3+
import uarray as array
44
except ImportError:
5-
print("SKIP")
6-
raise SystemExit
5+
try:
6+
import array
7+
except ImportError:
8+
print("SKIP")
9+
raise SystemExit
710

811
# arrays of objects
912
a = array.array('O')

tests/basics/bytearray_construct_array.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# test construction of bytearray from different objects
22
try:
3-
from array import array
3+
from uarray import array
44
except ImportError:
5-
print("SKIP")
6-
raise SystemExit
5+
try:
6+
from array import array
7+
except ImportError:
8+
print("SKIP")
9+
raise SystemExit
710

811
# arrays
912
print(bytearray(array('b', [1, 2])))

tests/basics/bytearray_construct_endian.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# test construction of bytearray from different objects
22
try:
3-
from array import array
3+
from uarray import array
44
except ImportError:
5-
print("SKIP")
6-
raise SystemExit
5+
try:
6+
from array import array
7+
except ImportError:
8+
print("SKIP")
9+
raise SystemExit
710

811
# arrays
912
print(bytearray(array('h', [1, 2])))

tests/basics/bytes_add_array.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# test bytes + other
22
try:
3-
import array
3+
import uarray as array
44
except ImportError:
5-
print("SKIP")
6-
raise SystemExit
5+
try:
6+
import array
7+
except ImportError:
8+
print("SKIP")
9+
raise SystemExit
710

811
# should be byteorder-neutral
912
print(b"123" + array.array('h', [0x1515]))

0 commit comments

Comments
 (0)