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_pow.cpython-39.opt-2.pyc

a

��g��@s6ddlZddlZGdd�dej�Zedkr2e��dS)�Nc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�PowTestc
Cs�|tk�r@tdd�D]h}|�t||�d�d�|�t||�d�||��|�t|d�d�|d��|�t|d�d�|d��qtdd�D]"}|�t||�d�|||�q�d}tdd�D]&}|�td	|�|�|d
kr�|d	}q�tfD]V}ttdd��ttdd��D]4}||�}tdd
�D]}||�}t||��q�qq�ttfD]L}tdd�D]:}|d�}||d�}	|	dk�r~�qV|�tt||	��qV�qHd\}
}d\}}
d\}}|j}|tk�r�d}
|j}n"|tk�r�d}n|tk�r�d\}}
t|
|d�D]�}t||
d�D]|}t||d�D]f}|dk�r|tk�s@|dk�rZ|�t	t||�||��q|t||�||�t||�|�||���q�q�q�dS)Ni���i�r�i�����d��������
�g$@)i���)����)r	r
)r�)
�float�range�assertEqual�pow�int�list�assertRaises�ZeroDivisionErrorZassertAlmostEqual�	TypeError)�self�type�iZpow2Z	othertype�ii�jZjjZzero�expZilZihZjlZjh�klZkhZasseq�k�r!�)/usr/local/lib/python3.9/test/test_pow.py�powtests^
 
 





�zPowTest.powtestcCs|�t�dS�N)r#r�rr!r!r"�test_powint<szPowTest.test_powintcCs|�t�dSr$)r#rr%r!r!r"�
test_powfloat?szPowTest.test_powfloatc
Cs|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��|�tdd�dtddd��tdd	�D]�}td
d�D]�}tdd	�D]r}|d
k�r�|d
k�r�|�t||�|t|||��|d
k�r�|d
k�r�|�tt|�|�|tt|�||���q��q��qrdS)
Nr�i����r������rr	rr�i����)rrrr)rrrr r!r!r"�
test_otherBs2
��zPowTest.test_othercCsGdd�d�}d|�dS)Nc@seZdZdd�ZdS)z(PowTest.test_bug643260.<locals>.TestRpowcSsdSr$r!)r�otherr!r!r"�__rpow__bsz1PowTest.test_bug643260.<locals>.TestRpow.__rpow__N)�__name__�
__module__�__qualname__r.r!r!r!r"�TestRpowasr2r!)rr2r!r!r"�test_bug643260`szPowTest.test_bug643260cCs�|j}d}|t|d�d�|t|d�d�tdd�D]$}|t|t|��|d@rRdpTd�q4tdd	�D]B}td
|�}|dr�dp�d}|t||�|�|t||�|�qd||d�dS)Ng�g��Nݯ�bg�?g��Nݯ��r	rrrrrg@)rrrr)r�eq�a�b�nZfivetoZexpectedr!r!r"�test_bug705231fs"zPowTest.test_bug705231cCs�tdd�D�]�}tdd�D�]�}|j||d���Z|dkr�t�||�dkr�t|d|�}|�|||�|�||d|d�|�t|d|�t|d|��|�t|d	|�t|d
|��|�t|d|�t|d|��n�|�t��t|d|�Wd�n1�s0Y|�t��t|d|�Wd�n1�s:0Y|�t��t|d|�Wd�n1�sr0YWd�q1�s�0Yqq
dS)
Ni����2)r5�mrr���r)rr*ri���i�)rZsubTest�math�gcdrrr�
ValueError)rr5r:�invr!r!r"�test_negative_exponent{s ,,zPowTest.test_negative_exponentN)
r/r0r1r#r&r'r,r3r8r@r!r!r!r"rs6r�__main__)r<ZunittestZTestCaserr/�mainr!r!r!r"�<module>s


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