bd3dd9296b
For a small number of bytes, it's expected to return a small int without allocation.
9 lines
225 B
Python
9 lines
225 B
Python
# Test that int.from_bytes() for small number of bytes generates
|
|
# small int.
|
|
import micropython
|
|
|
|
micropython.heap_lock()
|
|
print(int.from_bytes(b"1", "little"))
|
|
print(int.from_bytes(b"12", "little"))
|
|
micropython.heap_unlock()
|