summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/struct1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/struct1.py')
-rw-r--r--tests/basics/struct1.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py
index 87e2f07026..686251c446 100644
--- a/tests/basics/struct1.py
+++ b/tests/basics/struct1.py
@@ -52,3 +52,9 @@ print(struct.unpack("<Q", b"\xff\xff\xff\xff\xff\xff\xff\xff"))
# network byte order
print(struct.pack('!i', 123))
+
+# first arg must be a string
+try:
+ struct.pack(1, 2)
+except TypeError:
+ print('TypeError')