2018-06-20 02:08:25 -04:00
|
|
|
# test builtin print function, using file= argument
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
|
|
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")
|