Your IP : 216.73.216.52


Current Path : /opt/alt/python35/lib64/python3.5/test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/test/__pycache__/test_pow.cpython-35.opt-1.pyc



��Yf��@sKddlZddlZGdd�dej�ZedkrGej�dS)�Nc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�PowTestc	Cs�|tkr�x�tdd�D]�}|jt||�d�d�|jt||�d�||��|jt|d�d�|d��|jt|d�d�|d��qWx>tdd�D]-}|jt||�d�|||�q�Wd}xFtdd�D]5}|jtd|�|�|dkr|d}qWx�tfD]y}xpttdd��ttdd	��D]F}||�}x1tdd
�D] }||�}t||�q�Wq}WqNWxpttfD]b}xYtdd�D]H}|d�}||d�}	|	dkr q�|jtt||	�q�Wq�Wd\}
}d\}}
d\}}|j}|tkr�d}
|j}n-|tkr�d}n|tkr�d\}}
x�t|
|d�D]�}x�t||
d�D]�}x�t||d�D]�}|dkr�|tks(|dkrJ|jt	t||�||�q�|t||�||�t||�|�||��q�Wq�Wq�WdS)Ni�r��d�����
�g$@���i���i����i�������)rr���)rr���)rr	)rr
)
�float�range�assertEqual�pow�int�listZassertRaises�ZeroDivisionErrorZassertAlmostEqual�	TypeError)�self�type�iZpow2Z	othertypeZii�jZjjZzeroZexpZilZihZjlZjhZklZkhZasseq�k�r�2/opt/alt/python35/lib64/python3.5/test/test_pow.py�powtests^%%)+/
		zPowTest.powtestcCs|jt�dS)N)r r)rrrr�test_powint;szPowTest.test_powintcCs|jt�dS)N)r r)rrrr�
test_powfloat>szPowTest.test_powfloatc	Cs�|jtdd�dtddd��|jtdd�d
tddd��|jtdd�dtddd
��|jtdd�dtddd��|jtdd�dtddd��|jtdd�dtddd��|jtdd�dtddd��|jtdd�dtddd��|jtdd�dtddd��|jtdd�dtddd��|jtdd�dtddd��|jtdd�d tddd!��x�td"d�D]�}x�tdd�D]�}x�td#d�D]�}|dkro|dkro|jt||�|t|||��|dkr(|dkr(|jtt|�|�|tt|�||��q(WqWq�WdS)$Nr�rrr	r
r��i����i�������r&���r'r'i����r'i����i����i����i����i����r&r&r'r'r'i����r'i����i����i����i����i����)rrrr)rrrrrrr�
test_otherAs.))))))))))))zPowTest.test_othercCs"Gdd�d�}d|�dS)Nc@seZdZdd�ZdS)z(PowTest.test_bug643260.<locals>.TestRpowcSsdS)Nr)r�otherrrr�__rpow__asz1PowTest.test_bug643260.<locals>.TestRpow.__rpow__N)�__name__�
__module__�__qualname__r*rrrr�TestRpow`sr.r)rr.rrr�test_bug643260_szPowTest.test_bug643260cCs�|j}d
}|t|d�d�|t|d�d�xCtdd�D]2}|t|t|��|d@rvd
pyd�qKWxjtdd�D]Y}td|�}|d	r�dp�d}|t||�|�|t||�|�q�W||d�dS)Ng�?g��Nݯ�br	r
rrrrg@g�g��Nݯ��i����g�g�)rrrr)r�eq�a�b�nZfivetoZexpectedrrr�test_bug705231es	0zPowTest.test_bug705231N)	r+r,r-r r!r"r(r/r4rrrrrs6r�__main__)Ztest.supportZtestZunittestZTestCaserr+�mainrrrr�<module>sw