diff options
-rw-r--r-- | tests/float/bytearray_construct.py | 7 | ||||
-rw-r--r-- | tests/float/bytes_construct.py | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/float/bytearray_construct.py b/tests/float/bytearray_construct.py index f729266351..db946a99d3 100644 --- a/tests/float/bytearray_construct.py +++ b/tests/float/bytearray_construct.py @@ -1,5 +1,10 @@ # test construction of bytearray from array with float type -from array import array +try: + from array import array +except ImportError: + import sys + print("SKIP") + sys.exit() print(bytearray(array('f', [1, 2.3]))) diff --git a/tests/float/bytes_construct.py b/tests/float/bytes_construct.py index 0a57e08a2f..8664d7296d 100644 --- a/tests/float/bytes_construct.py +++ b/tests/float/bytes_construct.py @@ -1,5 +1,10 @@ # test construction of bytearray from array with float type -from array import array +try: + from array import array +except ImportError: + import sys + print("SKIP") + sys.exit() print(bytes(array('f', [1, 2.3]))) |