Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/tests/basics/io_stringio_with.py

10 lines
155 B
Python
Raw Normal View History

tests: Make "io" modules fixes for CPython compatibility. Previously, "import _io" worked on both CPython and MicroPython (essentially by a chance on CPython, as there's not guarantee that its contents will stay the same across versions), but as the module was renamed to uio, need to use more robust import sequence for compatibility.
2016-05-02 14:35:45 +03:00
try:
import uio as io
except ImportError:
import io
tests: Add missing tests for builtins, and many other things.
2015-04-04 22:05:30 +01:00
# test __enter__/__exit__
with io.StringIO() as b:
b.write("foo")
print(b.getvalue())
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 95ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API