Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_pstats.cpython-38.pyc
U

>��g$�@slddlZddlmZddlmZddlZddlmZGdd�dej�ZGdd�dej�Z	e
d	krhe��dS)
�N)�support)�StringIO)�SortKeyc@seZdZdZdd�ZdS)�AddCallersTestCasez$Tests for pstats.add_callers helper.cCsdddi}ddd�}t�||�}|�|ddd��ddi}ddd�}t�||�}|�|ddd��dS)	N�a)����)����)r�b)rr
rrrrr)�pstatsZadd_callers�assertEqual)�self�target�sourceZnew_callers�r�//opt/cppython/lib/python3.8/test/test_pstats.py�test_combine_resultss

z'AddCallersTestCase.test_combine_resultsN)�__name__�
__module__�__qualname__�__doc__rrrrrr	src@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�
StatsTestCasecCst�d�}t�|�|_dS)Nz
pstats.pck)rZfindfiler�Stats�stats)rZ
stats_filerrr�setUps
zStatsTestCase.setUpcCs&t�}tj|d�}|�|j|j�dS)N)�stream)rrr�addr)rr rrrr�test_add szStatsTestCase.test_addcCsLddddd�}|��D]0\}}|j�|�|�|jj|jj|d�qdS)N�stdname�calls�time�
cumulative)���rrrr')�itemsr�
sort_statsr�	sort_type�sort_arg_dict_default)rZ
valid_argsZarg_intZarg_strrrr�test_sort_stats_int%s�
�z!StatsTestCase.test_sort_stats_intcCs6dD],}|j�|�|�|jj|jj|d�qdS)N)
r$ZncallsZcumtimer&�filename�line�module�nameZnflZpcallsr#r%Ztottimer'�rr)rr*r+)r�	sort_namerrr�test_sort_stats_string/s

�z$StatsTestCase.test_sort_stats_stringcCs:d}dD],}|j�|�|�|jj|jj|d�qdS)Nr-)�f�fiZfil�fileZfilenZfilenaZfilenamr-r'r1)rZsortkeyr2rrr�test_sort_stats_partial7s
�z%StatsTestCase.test_sort_stats_partialcCs8tD].}|j�|�|�|jj|jj|jd�qdS)Nr')rrr)rr*r+�value)r�memberrrr�test_sort_stats_enum?s�z"StatsTestCase.test_sort_stats_enumcCs0|�t|jjdtj�|�t|jjtjd�dS)Nr$)ZassertRaises�	TypeErrorrr)rZTIME�rrrr�test_sort_starts_mixFs��z"StatsTestCase.test_sort_starts_mixcCs"|�tjd�|�tjtj�dS)Nr-)rrZFILENAMEZassertNotEqualZCALLSr<rrr�test_SortKey_enumOszStatsTestCase.test_SortKey_enumN)rrrrr"r,r3r7r:r=r>rrrrrs
	r�__main__)Zunittest�testr�iorrrZTestCaserrr�mainrrrr�<module>s8

F1le Man4ger