2018-06-20 02:08:25 -04:00
|
|
|
# test builtin print function, using file= argument
|
|
|
|
|
2020-06-18 05:19:14 -04:00
|
|
|
try:
|
|
|
|
import usys as sys
|
|
|
|
except ImportError:
|
|
|
|
import sys
|
2018-06-20 02:08:25 -04:00
|
|
|
|
|
|
|
try:
|
|
|
|
sys.stdout
|
|
|
|
except AttributeError:
|
2020-03-22 22:26:08 -04:00
|
|
|
print("SKIP")
|
2018-06-20 02:08:25 -04:00
|
|
|
raise SystemExit
|
|
|
|
|
|
|
|
print(file=sys.stdout)
|
2020-03-22 22:26:08 -04:00
|
|
|
print("test", file=sys.stdout)
|
2018-06-20 02:08:25 -04:00
|
|
|
|
|
|
|
try:
|
|
|
|
print(file=1)
|
2020-03-22 22:26:08 -04:00
|
|
|
except (AttributeError, OSError): # CPython and uPy differ in error message
|
|
|
|
print("Error")
|