diff options
Diffstat (limited to 'tests/float')
-rw-r--r-- | tests/float/array_construct.py | 6 | ||||
-rw-r--r-- | tests/float/bytearray_construct.py | 5 | ||||
-rw-r--r-- | tests/float/bytes_construct.py | 5 |
3 files changed, 16 insertions, 0 deletions
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]))) |