Skip to content
Snippets Groups Projects
Commit 0bd3f329 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/base/struct1.py: Add test for repetition counters.

parent 2b080cf5
No related branches found
No related tags found
No related merge requests found
...@@ -61,3 +61,8 @@ try: ...@@ -61,3 +61,8 @@ try:
struct.pack(1, 2) struct.pack(1, 2)
except TypeError: except TypeError:
print('TypeError') print('TypeError')
# Initially repitition counters were supported only for strings,
# but later were implemented for all.
print(struct.unpack("<3B2h", b"foo\x12\x34\xff\xff"))
print(struct.pack("<3B", 1, 2, 3))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment