python (3.11.7)
    e                         d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ  G d dej	                  Z
 G d dej	                  Zej         G d d	ej	                              Z
ed
k    r ej                     dS dS )    N)support)
script_helperc                       e Zd Zd ZdS )GeneralTestc                 V    t          j        d          }t          j        |           d S )Nz_test_atexit.py)r   findfiler   run_test_script)selfscripts     D/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_atexit.pytest_generalzGeneralTest.test_general   s*    !"344%f-----    N)__name__
__module____qualname__r
    r   r   r   r   
   s#        . . . . .r   r   c                       e Zd Zd Zd ZdS )FunctionalTestc                    t          j        d          }t          j        d|          }|                     |j                                                                        ddg           |                     |j	                   d S )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   sz       
 
 ,T488))4466GGG!!!!!r   c                    t          j        d          }t          j        d|          }|                     |j                                                                        ddg           |                     |j	                   d S )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    s{       
 
 ,T488))4466I8NOOO!!!!!r   N)r   r   r   r&