From 19b3fea6a885d071a1216614ee3f766aba947cbf Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 8 Jan 2015 15:41:37 +0000 Subject: [PATCH] tests: Separate out test cases that rely on float support to float/ dir. --- tests/basics/array_construct.py | 2 -- tests/basics/bytearray_construct.py | 1 - tests/basics/bytes_construct.py | 1 - tests/float/array_construct.py | 6 ++++++ tests/float/bytearray_construct.py | 5 +++++ tests/float/bytes_construct.py | 5 +++++ 6 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 tests/float/array_construct.py create mode 100644 tests/float/bytearray_construct.py create mode 100644 tests/float/bytes_construct.py diff --git a/tests/basics/array_construct.py b/tests/basics/array_construct.py index e050f3003b..8c0b4b5973 100644 --- a/tests/basics/array_construct.py +++ b/tests/basics/array_construct.py @@ -13,6 +13,4 @@ print(array('i', bytearray(4))) # convert from other arrays print(array('H', array('b', [1, 2]))) -print(array('f', array('h', [1, 2]))) print(array('b', array('I', [1, 2]))) -print(array('d', array('f', [1, 2]))) diff --git a/tests/basics/bytearray_construct.py b/tests/basics/bytearray_construct.py index 0a7097d55a..def78c0d21 100644 --- a/tests/basics/bytearray_construct.py +++ b/tests/basics/bytearray_construct.py @@ -11,4 +11,3 @@ print(bytearray([1, 2])) print(bytearray(array('b', [1, 2]))) print(bytearray(array('h', [1, 2]))) print(bytearray(array('I', [1, 2]))) -print(bytearray(array('f', [1, 2.3]))) diff --git a/tests/basics/bytes_construct.py b/tests/basics/bytes_construct.py index 1eb6d3e485..793d5115e1 100644 --- a/tests/basics/bytes_construct.py +++ b/tests/basics/bytes_construct.py @@ -11,4 +11,3 @@ print(bytes(bytearray(4))) print(bytes(array('b', [1, 2]))) print(bytes(array('h', [1, 2]))) print(bytes(array('I', [1, 2]))) -print(bytes(array('f', [1, 2.3]))) diff --git a/tests/float/array_construct.py b/tests/float/array_construct.py new file mode 100644 index 0000000000..a25cc72c80 --- /dev/null +++ b/tests/float/array_construct.py @@ -0,0 +1,6 @@ +# test construction of array from array with float type + +from array import array + +print(array('f', array('h', [1, 2]))) +print(array('d', array('f', [1, 2]))) diff --git a/tests/float/bytearray_construct.py b/tests/float/bytearray_construct.py new file mode 100644 index 0000000000..f729266351 --- /dev/null +++ b/tests/float/bytearray_construct.py @@ -0,0 +1,5 @@ +# test construction of bytearray from array with float type + +from array import array + +print(bytearray(array('f', [1, 2.3]))) diff --git a/tests/float/bytes_construct.py b/tests/float/bytes_construct.py new file mode 100644 index 0000000000..0a57e08a2f --- /dev/null +++ b/tests/float/bytes_construct.py @@ -0,0 +1,5 @@ +# test construction of bytearray from array with float type + +from array import array + +print(bytes(array('f', [1, 2.3])))