summaryrefslogtreecommitdiff
path: root/tests/float/float1.py
diff options
context:
space:
mode:
authorhathach <thach@tinyusb.org>2018-08-01 00:58:23 +0700
committerhathach <thach@tinyusb.org>2018-08-01 00:58:23 +0700
commit1e524f1b9800b4d734e0c3db0fb6434176c4d7a8 (patch)
tree06a6ffe912cb65d1bb78974d35f6b9eba3800c2a /tests/float/float1.py
parent20c25f61d92cfde9f259ee06ee47915e7a3ea3c5 (diff)
parentbf033123a7fa75394fd7a01d17ec99afd9abe645 (diff)
Merge branch 'master' into nrf52840_usb_hid
Diffstat (limited to 'tests/float/float1.py')
-rw-r--r--tests/float/float1.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/float/float1.py b/tests/float/float1.py
index c64f965a7..54807e5ac 100644
--- a/tests/float/float1.py
+++ b/tests/float/float1.py
@@ -36,6 +36,10 @@ try:
except ValueError:
print("ValueError")
+# construct from something with the buffer protocol
+print(float(b"1.2"))
+print(float(bytearray(b"3.4")))
+
# unary operators
print(bool(0.0))
print(bool(1.2))