mirror of
https://github.com/micropython/micropython.git
synced 2025-09-06 01:40:34 +02:00
Instead of using a feature check. This is more consistent with how other optional modules are skipped. Signed-off-by: Damien George <damien@micropython.org>
11 lines
173 B
Python
11 lines
173 B
Python
try:
|
|
import io
|
|
except ImportError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
# test __enter__/__exit__
|
|
with io.StringIO() as b:
|
|
b.write("foo")
|
|
print(b.getvalue())
|