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'))

# bool operator acting on arrays
print(bool(array.array('i')))
print(bool(array.array('i', [1])))

# bad typecode
try:
    array.array('X')
except ValueError:
    print("ValueError")

@@ -129,16 +129,158 @@
 t(i%5B-1%5D)
+%0Aa = array.array('l', %5B-1%5D)%0Aprint(len(a), a%5B0%5D)%0Aa1 = array.array('l', %5B1, 2, 3%5D)%0Aa2 = array.array('L', %5B1, 2, 3%5D)%0Aprint(a2%5B1%5D)%0Aprint(a1 == a2)
 %0A%0A# Empt

Add tests for "l", "L" array types to improve coverage.