python (3.12.0)
͑e d dl Z d dlZd dlZd dlZd dlmZ d dlmZ G d dej Z G d dej Z
ej G d d ej Ze
d
k( r ej yy) N)support)
script_helperc e Zd Zd Zy)GeneralTestc X t j d }t j | y )Nz_test_atexit.py)r findfiler run_test_script)selfscripts D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_atexit.pytest_generalzGeneralTest.test_general
s! !!"34%%f- N)__name__
__module____qualname__r
r r r r s .r r c e Zd Zd Zd Zy)FunctionalTestc t j d }t j d| }| j |j
j
j ddg | j |j y )Nz
import atexit
def f(msg):
print(msg)
atexit.register(f, "one")
atexit.register(f, "two")
-ctwoone
textwrapdedentr assert_python_okassertEqualoutdecode
splitlinesassertFalseerrr
coderess r
test_shutdownzFunctionalTest.test_shutdown sc
,,T48)446G!r c t j d }t j d| }| j |j
j
j ddg | j |j y )Na@
import sys
import atexit as atexit1
del sys.modules['atexit']
import atexit as atexit2
del sys.modules['atexit']
assert atexit2 is not atexit1
atexit1.register(print, "atexit1")
atexit2.register(print, "atexit2")
r atexit2atexit1r r# s r test_atexit_instancesz$FunctionalTest.test_atexit_instances sd
,,T48)446I8NO!r N)r r r r&