Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/test/__pycache__/test_pow.cpython-34.pyc

�
f f��@sWddlZddlZGdd�dej�Zdd�ZedkrSe�ndS)�Nc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�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}xItdd�D]8}|jtd|�|�|dkr|d}qqWx�tfD]y}xpttdd��ttdd	��D]F}||�}x1tdd
�D] }||�}t||�q�Wq�WqQWnxsttfD]e}x\tdd�D]K}|d�}||d�}	|	dkr)q�n|jtt||	�q�Wq�Wd\}
}d\}}
d\}}|j}|tkr�d}
|j}n0|tkr�d}n|tkr�d\}}
nx�t|
|d�D]�}x�t||
d�D]�}x�t||d�D]�}|dkr
|tks4|dkrY|jt	t||�||�q
n|t||�||�t||�|�||��q
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/python34/lib64/python3.4/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_powlong>szPowTest.test_powlongcCs|jt�dS)N)r r)rrrr�
test_powfloatAszPowTest.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]�}|dkrr|dkrr|jt||�|t|||��n|dkr(|dkr(|jtt|�|�|tt|�||��q(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_otherDs.))))))))))))zPowTest.test_othercCs"Gdd�d�}d|�dS)Nc@seZdZdd�ZdS)z(PowTest.test_bug643260.<locals>.TestRpowcSsdS)Nr)r�otherrrr�__rpow__dsz1PowTest.test_bug643260.<locals>.TestRpow.__rpow__N)�__name__�
__module__�__qualname__r+rrrr�TestRpowcsr/r)rr/rrr�test_bug643260bszPowTest.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_bug705231hs	0zPowTest.test_bug705231N)
r,r-r.r r!r"r#r)r0r5rrrrrs6rcCstjjt�dS)N)�testZsupportZrun_unittestrrrrr�	test_main}sr7�__main__)Ztest.supportr6ZunittestZTestCaserr7r,rrrr�<module>sz