python (3.11.7)
    e5.                     `   d Z ddlZddlZddlZ G d d          Zd Zd Zd Zd Zej	        d	             Z
d
 Zd Zd Z
d
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zedk    r7ddlm Z   e              ej!        d         Z"  e#            e"                      dS dS ) zThis script contains the actual auditing tests.
It should not be imported directly, but should be run by the test_audit
module with arguments identifying each test.
    Nc                   L    e Zd ZdZdefdZd Zd Zd Ze	d             Z
d ZdS )	TestHookzUsed in standard hook tests to collect any logged events.
    Should be used in a with block to ensure that it has no impact
    after the test completes.
    Nc                 B    |pd| _         || _        g | _        d| _        d S )N F)raise_on_eventsexc_typeseenclosed)selfr   r   s      D/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/audit-tests.py__init__zTestHook.__init__   s(    .4" 
	    c                 .    t          j        |            | S N)sysaddaudithookr   as     r   	__enter__zTestHook.__enter__   s    r   c                 .    |                                   d S r   )closer   s     r   __exit__zTestHook.__exit__   s    
r   c                     d| _         d S )NT)r
   r   s    r   r   zTestHook.close!   s
    r   c                 $    d | j         D             S )Nc                     g | ]
}|d          S )r   r   .0is     r   
<listcomp>z(TestHook.seen_events.<locals>.<listcomp>&