summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/int_bytes_long.py7
-rw-r--r--tests/basics/int_bytes_notimpl.py5
-rw-r--r--tests/basics/int_bytes_notimpl.py.exp1
3 files changed, 7 insertions, 6 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"))
diff --git a/tests/basics/int_bytes_notimpl.py b/tests/basics/int_bytes_notimpl.py
index b47d6ab584..b149f44966 100644
--- a/tests/basics/int_bytes_notimpl.py
+++ b/tests/basics/int_bytes_notimpl.py
@@ -2,8 +2,3 @@ try:
print((10).to_bytes(1, "big"))
except Exception as e:
print(type(e))
-
-try:
- print(int.from_bytes(b"\0", "big"))
-except Exception as e:
- print(type(e))
diff --git a/tests/basics/int_bytes_notimpl.py.exp b/tests/basics/int_bytes_notimpl.py.exp
index d1bf338eb6..606649a693 100644
--- a/tests/basics/int_bytes_notimpl.py.exp
+++ b/tests/basics/int_bytes_notimpl.py.exp
@@ -1,2 +1 @@
<class 'NotImplementedError'>
-<class 'NotImplementedError'>