This website requires JavaScript.
Explore
Help
Sign In
mirrors
/
micropython
mirror of
https://github.com/micropython/micropython.git
Watch
1
Star
0
Fork
You've already forked micropython
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
465a604547
micropython
/
tests
/
unicode
/
file1.py
5 lines
95 B
Python
Raw
Normal View
History
Unescape
Escape
Use mode/encoding kwargs in io and unicode tests mode argument is used to assert it works encoding argument is used to make sure CPython uses the correct encoding as it does not automatically use utf-8
2014-10-04 07:54:16 +01:00
f
=
open
(
"
unicode/data/utf-8_1.txt
"
,
encoding
=
"
utf-8
"
)
tests: Add basic test for unicode file i/o.
2014-06-15 21:28:39 +01:00
l
=
f
.
readline
(
)
print
(
l
)
print
(
len
(
l
)
)