Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_pstats.cpython-39.opt-2.pyc

a

��g;�@stddlZddlmZddlmZddlmZddlZddlZGdd�dej�Z	Gdd�dej�Z
ed	krpe��dS)
�N)�support)�StringIO)�SortKeyc@seZdZdd�ZdS)�AddCallersTestCasecCsdddi}ddd�}t�||�}|�|ddd��ddi}ddd�}t�||�}|�|ddd��dS)	N�a)����)����)r�b)rr
rrrrr)�pstatsZadd_callers�assertEqual)�self�target�sourceZnew_callers�r�,/usr/local/lib/python3.9/test/test_pstats.py�test_combine_results
s

z'AddCallersTestCase.test_combine_resultsN)�__name__�
__module__�__qualname__rrrrrr
src@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�
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)rrrrrr�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_string0s

�z$StatsTestCase.test_sort_stats_stringcCs:d}dD],}|j�|�|�|jj|jj|d�qdS)Nr,)�f�fiZfil�fileZfilenZfilenaZfilenamr,r&r0)rZsortkeyr1rrr�test_sort_stats_partial8s
�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_mixGs��z"StatsTestCase.test_sort_starts_mixcCs�dd�}dd�}dd�}t��}|��|�|�|�|��t�|�}|��}t|j�	��}|�
d|�|�
d|�|�
d	|�dS)
NcSsdS�Nrrrrr�pass1P�z3StatsTestCase.test_get_stats_profile.<locals>.pass1cSsdSr=rrrrr�pass2Qr?z3StatsTestCase.test_get_stats_profile.<locals>.pass2cSsdSr=rrrrr�pass3Rr?z3StatsTestCase.test_get_stats_profile.<locals>.pass3r>r@rA)�cProfileZProfile�enableZcreate_statsrrZget_stats_profile�setZ
func_profiles�keysZassertIn)rr>r@rAZprZpsZ
stats_profileZfuncs_calledrrr�test_get_stats_profileOs
z$StatsTestCase.test_get_stats_profilecCs"|�tjd�|�tjtj�dS)Nr,)rrZFILENAMEZassertNotEqualZCALLSr;rrr�test_SortKey_enumbszStatsTestCase.test_SortKey_enumN)rrrrr!r+r2r6r9r<rFrGrrrrrs
r�__main__)
Zunittest�testr�iorrrrBZTestCaserrr�mainrrrr�<module>sJ

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists