circuitpython/tests/basics/sys_stdio.py
timdechant 67c8b07343 shared/runtime/sys_stdio_mphal: Fix docstring for stdio.
Signed-off-by: timdechant <timdechant.git@gmail.com>
2024-09-03 22:47:19 -04:00

21 lines
472 B
Python

# Test sys.std* objects.
import sys
try:
sys.stdout
sys.stdin
sys.stderr
except AttributeError:
print("SKIP")
raise SystemExit
# CPython is more verbose; no need to match exactly
print('TextIOWrapper' in str(sys.stdout))
print('TextIOWrapper' in str(sys.stderr))
print('TextIOWrapper' in str(sys.stdin))
print('TextIOWrapper' in str(type(sys.stdout)))
print('TextIOWrapper' in str(type(sys.stderr)))
print('TextIOWrapper' in str(type(sys.stdin)))