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_xdrlib.cpython-34.pyo

�
g f)	�@s�ddlmZddlZddlZGdd�dej�ZGdd�dej�Zdd�Zed	kr|e�ndS)
�)�supportNc@seZdZdd�ZdS)�XDRTestcCsYtj�}d}ddddg}|jd�|jd�|jd�|jd	�|jd
�|jd�|jd�|jd�|j|�|j	t
d
�|j�|j||j�|j�}tj
|�}|j|j�d�|j|j�d�|j|j�d�|j|j�d�|j|j�d	k�|j�}|j|j�d
k�|j|�|j|j�d
k�|j|j�d�|j|j�d�|j|j�d�|j|j�|�|j|j|j�tt
d
���|j|j|j�|�|j�|jt|j�dS)Nshello worldswhatsisshapninsdoctor�*��	TF�-gffffff�?�ri��i��) �xdrlib�Packer�pack_int�	pack_uintZ	pack_bool�pack_uhyper�
pack_float�pack_doubleZpack_stringZ	pack_list�rangeZ
pack_arrayZ
get_bufferZUnpackerZassertEqualZget_positionZ
unpack_intZunpack_uintZ
assertTrueZunpack_boolZset_positionZ
unpack_uhyperZassertAlmostEqualZunpack_floatZ
unpack_doubleZ
unpack_stringZunpack_list�listZunpack_array�done�assertRaises�EOFError)�self�p�s�a�dataZup�pos�r�5/opt/alt/python34/lib64/python3.4/test/test_xdrlib.py�test_xdrsB









(
zXDRTest.test_xdrN)�__name__�
__module__�__qualname__rrrrrrsrc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ConversionErrorTestcCstj�|_dS)N)r	r
�packer)rrrr�setUp8szConversionErrorTest.setUpcGs|jtj|�dS)N)rr	ZConversionError)r�argsrrr�assertRaisesConversion;sz*ConversionErrorTest.assertRaisesConversioncCs|j|jjd�dS)N�string)r%r"r)rrrr�
test_pack_int>sz!ConversionErrorTest.test_pack_intcCs|j|jjd�dS)Nr&)r%r"r)rrrr�test_pack_uintAsz"ConversionErrorTest.test_pack_uintcCs|j|jjd�dS)Nr&)r%r"r)rrrr�
test_floatDszConversionErrorTest.test_floatcCs|j|jjd�dS)Nr&)r%r"r)rrrr�test_doubleGszConversionErrorTest.test_doublecCs|j|jjd�dS)Nr&)r%r"r
)rrrr�test_uhyperJszConversionErrorTest.test_uhyperN)
rrr r#r%r'r(r)r*r+rrrrr!6sr!cCstjt�tjt�dS)N)rZrun_unittestrr!rrrr�	test_mainMs
r,�__main__)	ZtestrZunittestr	ZTestCaserr!r,rrrrr�<module>s0