tests/struct1: Add testcase for an unknown type char.

pull/2080/head
Paul Sokolovsky 2016-05-14 15:54:09 +03:00
rodzic e53fb1bf03
commit 719f8c044a
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -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"))