tests/array*: Allow to skip test if "array" is unavailable.
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
from array import array
|
||||
try:
|
||||
from array import array
|
||||
except ImportError:
|
||||
import sys
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
# construct from something with unknown length (requires generators)
|
||||
print(array('i', (i for i in range(10))))
|
||||
|
||||
Reference in New Issue
Block a user