diff options
Diffstat (limited to 'tests/basics/struct1.py')
-rw-r--r-- | tests/basics/struct1.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py index 1afea5a96f..857e171c10 100644 --- a/tests/basics/struct1.py +++ b/tests/basics/struct1.py @@ -62,6 +62,12 @@ try: except TypeError: print('TypeError') +# make sure that unknown types are detected +try: + struct.pack("z", 1) +except: + print("Unknown type") + # Initially repitition counters were supported only for strings, # but later were implemented for all. print(struct.unpack("<3B2h", b"foo\x12\x34\xff\xff")) |