summaryrefslogtreecommitdiff
path: root/tests/float/float2int_intbig.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-05-28 10:49:22 +1000
committerDamien George <damien@micropython.org>2024-05-28 10:49:22 +1000
commitad6750b22ef160a233acf0fbf52619d13bcf273e (patch)
tree4481a679a92bbf24f992a3f8b801babb111495a9 /tests/float/float2int_intbig.py
parent5f6e6891245c5c766801bb6c0a62395fefae132c (diff)
tests/float: Use "not" instead of ~ to invert bool value.
Otherwise CPython gives a deprecation warning. This test is not actually testing inversion of bools, rather that bit of the test is used to compute the pass/fail result. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/float/float2int_intbig.py')
-rw-r--r--tests/float/float2int_intbig.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/float/float2int_intbig.py b/tests/float/float2int_intbig.py
index d047f247f..17414501c 100644
--- a/tests/float/float2int_intbig.py
+++ b/tests/float/float2int_intbig.py
@@ -59,7 +59,7 @@ print("power of 10 test: %s" % (testpass and "passed" or "failed"))
def fp2int_test(num, name, should_fail):
try:
x = int(num)
- passed = ~should_fail
+ passed = not should_fail
except:
passed = should_fail
print("%s: %s" % (name, passed and "passed" or "failed"))