| Server IP : 121.121.20.254 / Your IP : 216.73.217.51 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/test/__pycache__/ |
Upload File : |
�
���g19 � �~ � 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� Zd� Zd� Zd� Z d � Z!d!� Z"d"� Z#e$d#k( r7dd$l%m&Z& e&� ejN d% Z( e)� e( ejN d&d � yy)'z�This 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 �D � e Zd ZdZdefd�Zd� Zd� Zd� Ze d� � Z
d� Zy) �TestHookz�Used 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 �D � |xs d| _ || _ g | _ d| _ y )N� F)�raise_on_events�exc_type�seen�closed)�selfr r s �%C:\Python312\\Lib\test\audit-tests.py�__init__zTestHook.__init__ s$ � �.�4�"��� ��
��� ���� c �0 � t j | � | S �N)�sys�addaudithook�r �as r � __enter__zTestHook.__enter__ s � �������r c �$ � | j � y r )�closer s r �__exit__zTestHook.__exit__ s � ��
�
�r c � � d| _ y )NT)r
�r s r r zTestHook.close! s � ���r c �F � | j D �cg c] }|d �� c}S c c}w )Nr )r )r �is r �seen_eventszTestHook.seen_events$ s"