diff --git a/tests/basics/int_bytes_long.py b/tests/basics/int_bytes_long.py new file mode 100644 index 0000000000000000000000000000000000000000..81ebc6cdcdd305f009eca57223c6dd9f9edc69db --- /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 b47d6ab5843ca38e8bafbe1ee6a6ff6622c0c114..b149f44966bb1add2755ed0f44f5469724c4c95b 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 d1bf338eb64598d5c06c0b5252a192fbc3a529d0..606649a693fd0a3f751670c884405cfc8ef74a36 100644 --- a/tests/basics/int_bytes_notimpl.py.exp +++ b/tests/basics/int_bytes_notimpl.py.exp @@ -1,2 +1 @@ <class 'NotImplementedError'> -<class 'NotImplementedError'>