| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.10/test/__pycache__/ |
Upload File : |
o
�9ji- � @ s d Z ddlZddlZddlZG dd� d�Zdd� Zdd� Zd d
� Zdd� Zej d
d� �Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Zd-d.� Zd/d0� Zd1d2� Zed3kr�dd4lmZ e� ej d5 Z!e"� e! � dS dS )6z�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 @ sJ e Zd ZdZdefdd�Zdd� Zdd� Zd d
� Ze dd� �Z
d
d� ZdS )�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 C s |pd| _ || _g | _d| _d S )N� F)�raise_on_events�exc_type�seen�closed)�selfr r r r �'/usr/lib/python3.10/test/audit-tests.py�__init__ s
zTestHook.__init__c G s t �| � | S �N)�sys�addaudithook�r �ar r r � __enter__ s
zTestHook.__enter__c G s | � � d S r )�closer r r r �__exit__ s zTestHook.__exit__c C s
d| _ d S )NT)r �r r r r r ! s
zTestHook.closec C s dd� | j D �S )Nc S s g | ]}|d �qS )r r ��.0�ir r r �
<listcomp>&