mirror of
https://github.com/micropython/micropython.git
synced 2026-05-01 13:20:14 +02:00
bf08f601fa
Signed-off-by: Damien George <damien@micropython.org>
17 lines
271 B
Python
17 lines
271 B
Python
# cmdline: -m cmdline.cmd_module_atexit
|
|
#
|
|
# Test running as a module and using sys.atexit.
|
|
|
|
import sys
|
|
|
|
if not hasattr(sys, "atexit"):
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
# Verify we ran as a module.
|
|
print(sys.argv)
|
|
|
|
sys.atexit(lambda: print("done"))
|
|
|
|
print("start")
|