Skip to content

Commit 0bd3f32

Browse files
committed
tests/base/struct1.py: Add test for repetition counters.
1 parent 2b080cf commit 0bd3f32

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/basics/struct1.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@
6161
struct.pack(1, 2)
6262
except TypeError:
6363
print('TypeError')
64+
65+
# Initially repitition counters were supported only for strings,
66+
# but later were implemented for all.
67+
print(struct.unpack("<3B2h", b"foo\x12\x34\xff\xff"))
68+
print(struct.pack("<3B", 1, 2, 3))

0 commit comments

Comments
 (0)