From 27465e6b24e80fdcdaddd015fe8f690122f78ef8 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 10 Feb 2020 22:22:12 +1100 Subject: 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. --- tests/float/float1.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/float/float1.py') diff --git a/tests/float/float1.py b/tests/float/float1.py index 54807e5ac..f6d69e390 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') -- cgit v1.2.3