2019-10-29 07:16:19 -04:00
|
|
|
# test sys module's exit function
|
|
|
|
|
2020-06-18 05:19:14 -04:00
|
|
|
try:
|
|
|
|
import usys as sys
|
|
|
|
except ImportError:
|
|
|
|
import sys
|
2019-10-29 07:16:19 -04:00
|
|
|
|
|
|
|
try:
|
|
|
|
sys.exit
|
|
|
|
except AttributeError:
|
|
|
|
print("SKIP")
|
|
|
|
raise SystemExit
|
|
|
|
|
|
|
|
try:
|
|
|
|
raise SystemExit
|
|
|
|
except SystemExit as e:
|
|
|
|
print("SystemExit", e.args)
|
|
|
|
|
|
|
|
try:
|
|
|
|
sys.exit()
|
|
|
|
except SystemExit as e:
|
|
|
|
print("SystemExit", e.args)
|
|
|
|
|
|
|
|
try:
|
|
|
|
sys.exit(42)
|
|
|
|
except SystemExit as e:
|
|
|
|
print("SystemExit", e.args)
|