summaryrefslogtreecommitdiff
path: root/tests/basics/bytes_construct.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/bytes_construct.py')
-rw-r--r--tests/basics/bytes_construct.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/bytes_construct.py b/tests/basics/bytes_construct.py
index de6b5d954..0cf0540c7 100644
--- a/tests/basics/bytes_construct.py
+++ b/tests/basics/bytes_construct.py
@@ -14,3 +14,9 @@ print(bytes(array('I', [1, 2])))
# long ints
print(ord(bytes([14953042807679334000 & 0xff])))
+
+# error in construction
+try:
+ a = bytes([1, 2, 3], 1)
+except TypeError:
+ print('TypeError')