summaryrefslogtreecommitdiff
path: root/tests/basics/nanbox_smallint.py
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2024-02-08 16:56:52 -0800
committerDamien George <damien@micropython.org>2025-01-26 22:51:50 +1100
commit7b3f189b1723fe642f122a3b7826d16fe32f801a (patch)
treeb48de010b4b279942c11bb466cbb248dbf2119f7 /tests/basics/nanbox_smallint.py
parenta4ab847688406bb31eb531e07155bf173a8785aa (diff)
tests/basics/nanbox_smallint.py: Fix incorrect use of int() in test.
The literal is in base 16 but int()'s default radix in CPython is 10, not 0. Signed-off-by: Jeff Epler <jepler@gmail.com>
Diffstat (limited to 'tests/basics/nanbox_smallint.py')
-rw-r--r--tests/basics/nanbox_smallint.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/basics/nanbox_smallint.py b/tests/basics/nanbox_smallint.py
index b3a502e44..9451ab328 100644
--- a/tests/basics/nanbox_smallint.py
+++ b/tests/basics/nanbox_smallint.py
@@ -23,17 +23,17 @@ if float("1e100") == float("inf"):
raise SystemExit
micropython.heap_lock()
-print(int("0x80000000"))
+print(int("0x80000000", 16))
micropython.heap_unlock()
# This is the most positive small integer.
micropython.heap_lock()
-print(int("0x3fffffffffff"))
+print(int("0x3fffffffffff", 16))
micropython.heap_unlock()
# This is the most negative small integer.
micropython.heap_lock()
-print(int("-0x3fffffffffff") - 1)
+print(int("-0x3fffffffffff", 16) - 1)
micropython.heap_unlock()
x = 1