summaryrefslogtreecommitdiff
path: root/tests/basics/int_bytes.py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-05-12 11:17:29 -0400
committerDan Halbert <halbert@halwitz.org>2019-05-12 11:17:29 -0400
commit8664a6574b4cb448df26bfaa0e12eb203cc5d759 (patch)
tree3fbbb02abd779ccb7e34f53b0b20d37a25b3e27c /tests/basics/int_bytes.py
parentd103ac1d6325a075be3fafe812858584435f3144 (diff)
use approx of original @godlygeek code for smallints; add tests
Diffstat (limited to 'tests/basics/int_bytes.py')
-rw-r--r--tests/basics/int_bytes.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/int_bytes.py b/tests/basics/int_bytes.py
index 8c0c9a82f..aaf440081 100644
--- a/tests/basics/int_bytes.py
+++ b/tests/basics/int_bytes.py
@@ -1,4 +1,6 @@
print((10).to_bytes(1, "little"))
+# Test fitting in length that's not a power of two.
+print((0x10000).to_bytes(3, 'little'))
print((111111).to_bytes(4, "little"))
print((100).to_bytes(10, "little"))