summaryrefslogtreecommitdiff
path: root/tests/basics/bytes_construct.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-08-21 11:56:14 +0100
committerDamien George <damien.p.george@gmail.com>2015-08-21 12:02:09 +0100
commitd007cb890394d9d26c6fafb133532a5175d91eb2 (patch)
tree4fc76a836e7f9738d146bacac9b02f2e288c144b /tests/basics/bytes_construct.py
parentd292a81e95bd558f3902f88fa4d6d5641a4aa388 (diff)
tests: Add more tests to improve coverage, mostly testing exceptions.
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')