Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
aee13ef3
Commit
aee13ef3
authored
Dec 09, 2016
by
Paul Sokolovsky
Browse files
tests: Update for required byteorder arg for int.from_bytes()/to_bytes().
parent
9d787de2
Changes
4
Hide whitespace changes
Inline
Side-by-side
tests/basics/int_bytes_notimpl.py
0 → 100644
View file @
aee13ef3
try
:
print
((
10
).
to_bytes
(
1
,
"big"
))
except
Exception
as
e
:
print
(
type
(
e
))
try
:
print
(
int
.
from_bytes
(
b
"
\0
"
,
"big"
))
except
Exception
as
e
:
print
(
type
(
e
))
tests/basics/int_bytes_notimpl.py.exp
0 → 100644
View file @
aee13ef3
<class 'NotImplementedError'>
<class 'NotImplementedError'>
tests/extmod/uctypes_ptr_le.py
View file @
aee13ef3
...
...
@@ -14,7 +14,7 @@ desc = {
bytes
=
b
"01"
addr
=
uctypes
.
addressof
(
bytes
)
buf
=
addr
.
to_bytes
(
uctypes
.
sizeof
(
desc
))
buf
=
addr
.
to_bytes
(
uctypes
.
sizeof
(
desc
)
,
"little"
)
S
=
uctypes
.
struct
(
uctypes
.
addressof
(
buf
),
desc
,
uctypes
.
LITTLE_ENDIAN
)
...
...
tests/extmod/uctypes_ptr_native_le.py
View file @
aee13ef3
...
...
@@ -15,7 +15,7 @@ desc = {
bytes
=
b
"01"
addr
=
uctypes
.
addressof
(
bytes
)
buf
=
addr
.
to_bytes
(
uctypes
.
sizeof
(
desc
))
buf
=
addr
.
to_bytes
(
uctypes
.
sizeof
(
desc
)
,
"little"
)
S
=
uctypes
.
struct
(
uctypes
.
addressof
(
buf
),
desc
,
uctypes
.
NATIVE
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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