summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/float1.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-10 22:22:12 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-11 11:06:17 +1100
commit27465e6b24e80fdcdaddd015fe8f690122f78ef8 (patch)
tree5bc93de146462c95e47eaa4374df6195e97d5e8e /tests/float/float1.py
parent9ec1caf42e7733b5141b7aecf1b6e58834a94bf7 (diff)
downloadmicropython-27465e6b24e80fdcdaddd015fe8f690122f78ef8.tar.gz
micropython-27465e6b24e80fdcdaddd015fe8f690122f78ef8.zip
tests/basics: Add tests for equality between bool and int/float/complex.
False/True should be implicitly converted to 0/1 when compared with numeric types.
Diffstat (limited to 'tests/float/float1.py')
-rw-r--r--tests/float/float1.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/float/float1.py b/tests/float/float1.py
index 54807e5ac9..f6d69e3904 100644
--- a/tests/float/float1.py
+++ b/tests/float/float1.py
@@ -64,6 +64,8 @@ print(1.2 <= 3.4)
print(1.2 <= -3.4)
print(1.2 >= 3.4)
print(1.2 >= -3.4)
+print(0.0 == False, 1.0 == True)
+print(False == 0.0, True == 1.0)
# comparison of nan is special
nan = float('nan')