Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
0bd3f329
Commit
0bd3f329
authored
Oct 31, 2015
by
Paul Sokolovsky
Browse files
tests/base/struct1.py: Add test for repetition counters.
parent
2b080cf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/basics/struct1.py
View file @
0bd3f329
...
...
@@ -61,3 +61,8 @@ try:
struct
.
pack
(
1
,
2
)
except
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
))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment