Your IP : 216.73.216.85


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-2.pyc



���]��@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	othertype�ii�jZjjZzero�expZilZihZjlZjh�klZkhZasseq�k�r!�-/opt/alt/python35/lib64/python3.5/test_pow.py�powtests^%%)+/
		zPowTest.powtestcCs|jt�dS)N)r#r)rr!r!r"�test_powint;szPowTest.test_powintcCs|jt�dS)N)r#r)rr!r!r"�
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)rrrr r!r!r"�
test_otherAs.))))))))))))zPowTest.test_othercCs"Gdd�d�}d|�dS)Nc@seZdZdd�ZdS)z(PowTest.test_bug643260.<locals>.TestRpowcSsdS)Nr!)r�otherr!r!r"�__rpow__asz1PowTest.test_bug643260.<locals>.TestRpow.__rpow__N)�__name__�
__module__�__qualname__r-r!r!r!r"�TestRpow`sr1r!)rr1r!r!r"�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�nZfivetoZexpectedr!r!r"�test_bug705231es	0zPowTest.test_bug705231N)	r.r/r0r#r$r%r+r2r7r!r!r!r"rs6r�__main__)Ztest.supportZtestZunittestZTestCaserr.�mainr!r!r!r"�<module>sw