Your IP : 216.73.216.213


Current Path : /opt/alt/python310/lib64/python3.10/test/libregrtest/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/test/libregrtest/__pycache__/setup.cpython-310.opt-2.pyc

o

0�i��@s�ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	m
Z
zddlZWney7dZYnwddl
mZmZdZdd�Zdd	�Zd
d�ZdS)�N)�support)�TESTFN_UNDECODABLE�FS_NONASCII)�setup_unraisable_hook�setup_threading_excepthookZPYTHONREGRTEST_UNICODE_GUARDc		Csjztj��}Wn
ttfyd}Yn-wtjd|d�g}ttd�r)|�	tj
�ttd�r4|�	tj�|D]
}tj|d|d�q6t
�t�t�tj�|jr\tj�dtj�|j��tj��D](}t|d�r{t|j�D]
\}}tj�|�|j|<qmt|dd�r�tj�|j�|_qa|jr�d	tj_ t�!�|j"dur�t�#|j"�|j$dur�t%�&|j$�t�'|j(o�|j(d
k�|j)t_)ttd�r�dd
�}t�*|�t+�t,�|j-du�rt.tj/|j-d�t_/t.tj0|j-d�t_0t1tj2|j-�t_2t1tj3|j-�t_3t1tj/|j-�t_/t1tj0|j-�t_0|j4�rddl5m6}d|_7t8�r'tj9�r'tj:�;t<�=�t8�dSt>�r3tj?�;t<t>�dSdS)NT)Zall_threads�file�SIGALRM�SIGUSR1)�chainrr�__path__�__file__F��addaudithookcSsdS�N�)�name�argsrr�=/opt/alt/python310/lib64/python3.10/test/libregrtest/setup.py�_test_audit_hookUsz%setup_tests.<locals>._test_audit_hook�(�)�RegressionTestResult)@�sys�
__stderr__�fileno�
ValueError�AttributeError�faulthandlerZenable�hasattr�signal�appendrr	�register�_adjust_resource_limits�replace_stdoutrZrecord_original_stdout�stdoutZtestdir�path�insert�os�abspath�modules�values�	enumerater�getattrrZ
huntrleaks�unittestZ
BaseTestSuiteZ_cleanup�_deactivate_opcacheZmemlimitZset_memlimitZ	threshold�gcZ
set_thresholdZsuppress_msvcrt_asserts�verboseZ
use_resourcesrrrZtimeout�maxZ
SHORT_TIMEOUTZLONG_TIMEOUT�minZLOOPBACK_TIMEOUTZINTERNET_TIMEOUTZxmlpathZtest.support.testresultrZUSE_XMLr�supports_bytes_environ�environb�
setdefault�UNICODE_GUARD_ENV�encoder�environ)	�nsZ	stderr_fdZsignalsZsignum�module�indexr%rrrrr�setup_testssl�


�



�r<cs\	tj�z���}Wn
tyYdSwt|d�jdddd�t_�fdd�}t�|�dS)N�w�backslashreplaceF�
)�encoding�errors�closefd�newlinecstj���t_dSr)rr$�closer�r$rr�restore_stdout�s

z&replace_stdout.<locals>.restore_stdout)rr$rr�openr@�atexitr!)�fdrFrrErr#ss��r#cCs�	zddl}ddlm}m}Wn
tyYdSw|�|�\}}d}||kri||krkt||�}z|�|||f�td|�d|���WdStt	fyh}ztd|�d|�d|�d	��WYd}~dSd}~wwdSdS)
Nr)�
RLIMIT_NOFILE�
RLIM_INFINITYizRaised RLIMIT_NOFILE: z -> z#Unable to raise RLIMIT_NOFILE from z to z: �.)
�resourcerJrK�ImportErrorZ	getrlimitr2Z	setrlimit�printr�OSError)rMrJrKZfd_limitZmax_fdsZdesired_fdsZnew_fd_limit�errrrrr"�s.�

�����r")rHrr'rrr-�testrZtest.support.os_helperrrr/rNZtest.libregrtest.utilsrrr6r<r#r"rrrr�<module>s$�^