tests/array*: Allow to skip test if "array" is unavailable.

This commit is contained in:
Paul Sokolovsky
2017-01-07 01:13:40 +03:00
parent e5a6a26330
commit ef1bbada96
6 changed files with 36 additions and 6 deletions

View File

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