summaryrefslogtreecommitdiff
path: root/tests/basics/int_longint_bytes.py
blob: 42e445f539d4359eb13320416371b64a52b3ea9b (plain)
1
2
3
4
5
6
7
8
# Skip if long ints are not supported.
import skip_if
skip_if.no_bigint()

print((2**64).to_bytes(9, "little"))
print(int.from_bytes(b"\x00\x01\0\0\0\0\0\0", "little"))
print(int.from_bytes(b"\x01\0\0\0\0\0\0\0", "little"))
print(int.from_bytes(b"\x00\x01\0\0\0\0\0\0", "little"))