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
43384ad7
Commit
43384ad7
authored
Dec 28, 2016
by
Damien George
Browse files
tests/basics: Add tests for parsing of ints with base 36.
parent
2d9440e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/basics/int1.py
View file @
43384ad7
...
...
@@ -36,6 +36,7 @@ print(int('11', 16))
print
(
int
(
'11'
,
8
))
print
(
int
(
'11'
,
2
))
print
(
int
(
'11'
,
36
))
print
(
int
(
'xyz'
,
36
))
print
(
int
(
'0o123'
,
0
))
print
(
int
(
'8388607'
))
print
(
int
(
'0x123'
,
16
))
...
...
tests/basics/int_mpz.py
View file @
43384ad7
...
...
@@ -68,6 +68,7 @@ print(int("123456789012345678901234567890"))
print
(
int
(
"-123456789012345678901234567890"
))
print
(
int
(
"123456789012345678901234567890abcdef"
,
16
))
print
(
int
(
"123456789012345678901234567890ABCDEF"
,
16
))
print
(
int
(
"1234567890abcdefghijklmnopqrstuvwxyz"
,
36
))
# invalid characters in string
try
:
...
...
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