summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/int_bytes_long.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/int_bytes_long.py')
-rw-r--r--tests/basics/int_bytes_long.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/basics/int_bytes_long.py b/tests/basics/int_bytes_long.py
new file mode 100644
index 0000000000..81ebc6cdcd
--- /dev/null
+++ b/tests/basics/int_bytes_long.py
@@ -0,0 +1,7 @@
+b = bytes(range(20))
+
+il = int.from_bytes(b, "little")
+ib = int.from_bytes(b, "big")
+print(il)
+print(ib)
+print(il.to_bytes(20, "little"))