HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/libregrtest/__pycache__/utils.cpython-310.opt-1.pyc
o

�i�@s�ddlZddlZddlZddlZddlmZdd�Zdd�Zdd�Z	ddd�Z
d
d�Zdadd�Z
dd�Zdd�Zdadd�Zdd�Zdd�ZdS)�N)�supportcCs�t�|d�}t|d�\}}t|d�\}}t|d�\}}g}|r'|�d|�|r0|�d|�|rG|r<|�d|�n|�d||d�|sMd|S|dd	�}d
�|�S)Ng@�@i��<z%s hourz%s minz%s secz%.1f secz%s ms�� )�math�ceil�divmod�append�join)Zseconds�msZminutesZhours�parts�r
�3/usr/local/lib/python3.10/test/libregrtest/utils.py�format_durations"
rcCs>|sdSt|�D]\}}tj�|�\}}|dkr|||<qdS)Nz.py)�	enumerate�os�path�splitext)�names�idx�name�basename�extr
r
r�removepy!s��rcCs |dkr
d||fSd||fS)N�z%d %sz%d %ssr
)�nZwordr
r
r�count*sr�F�cCs:d|}ttjd�dd�t|�D��|||d�|d�dS)z�Print the elements of iterable x to stdout.

    Optional arg width (default 70) is the maximum line length.
    Optional arg indent (default 4) is the number of blanks with which to
    begin each line.
    rcss�|]}t|�VqdS�N)�str)�.0�eltr
r
r�	<genexpr>;s�zprintlist.<locals>.<genexpr>)�initial_indent�subsequent_indent)�fileN)�print�textwrap�fillr
�sorted)�x�width�indentr&Zblanksr
r
r�	printlist1s�
�r.cCst�|�dSr)r�
print_warning)�msgr
r
rr/@sr/cCs0tjdur
tj��tjdurtj��dSdSr)�sys�stdout�flush�stderrr
r
r
r�flush_std_streamsGs



�r5cCsJdt_td�tj}zt�tjt_t|�tj��W|t_dS|t_w)NTzUnraisable exception)	r�environment_alteredr/r1r4r5�
__stderr__�orig_unraisablehookr3)Z
unraisable�
old_stderrr
r
r�regrtest_unraisable_hookNsr:cCstjatt_dSr)r1�unraisablehookr8r:r
r
r
r�setup_unraisable_hook\s
r<cCsTdt_td|jj���tj}zt�tjt_t	|�tj�
�W|t_dS|t_w)NTzUncaught thread exception: )rr6r/�exc_type�__name__r1r4r5r7�orig_threading_excepthookr3)�argsr9r
r
r�regrtest_threading_excepthookesrAcCsddl}|jat|_dS)Nr)�	threading�
excepthookr?rA)rBr
r
r�setup_threading_excepthookss
rDcCs`tj��D]	}t|d�r|`qtjtjtjtjfD]
}|dur#|�	�qztjd}Wn	t
y4Ynw|j��ztjd}Wn	t
yJYnw|�
�ztjd}Wn	t
y_Ynw|j��ztjd}Wn	t
yuYnw|��ztjd}Wn	t
y�Ynw|��ztjd}Wn	t
y�Ynw|��ztjd}Wn	t
y�Ynw|��ztjd	}	Wn	t
y�Ynw|	j��ztjd
}
Wn	t
y�Ynw|
��ztjd}Wn	t
y�Ynwd|_ztjd}Wn
t
�y	Ynw|��ztjd
}
Wn
t
�yYnw|
jD]}|��q#t��dS)N�__warningregistry__zdistutils.dir_util�re�	_strptimezurllib.parsezurllib.request�	linecache�	mimetypes�filecmp�struct�doctest�ctypes�typing)r1�modules�values�hasattrrEr2r4�
__stdout__r7r3�KeyErrorZ
_path_created�clear�purgeZ_regex_cache�clear_cache�
urlcleanup�
clearcacheZ_default_mime_types�_cache�_clearcacheZmasterZ_reset_cacheZ	_cleanupsr�
gc_collect)�mod�streamZdistutils_dir_utilrFrGZurllib_parseZurllib_requestrHrIrJrKrLrMrN�fr
r
r�clear_cacheszs�
���
��
�����
����

r_)rrN)rZos.pathrr1r(�testrrrrr.r/r8r5r:r<r?rArDr_r
r
r
r�<module>s$