tests/basics: Split sys.exit test to separate file so it can be skipped.

pull/5227/head
Damien George 2019-10-29 22:16:19 +11:00
rodzic 1d51115246
commit 943dd33b5f
2 zmienionych plików z 24 dodań i 15 usunięć

Wyświetl plik

@ -18,18 +18,3 @@ try:
except AttributeError:
# Effectively skip subtests
print(True)
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)

Wyświetl plik

@ -0,0 +1,24 @@
# test sys module's exit function
import sys
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)