Your IP : 216.73.217.129


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



��Yf��@sddlZddlmZejd�ddlmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZeddddd	d
ddd
dddd�
ZGdd�dej�ZGdd�dej�Zedkrej�dS)�N)�support�	_testcapi)�_test_structmembersType�CHAR_MAX�CHAR_MIN�	UCHAR_MAX�SHRT_MAX�SHRT_MIN�	USHRT_MAX�INT_MAX�INT_MIN�UINT_MAX�LONG_MAX�LONG_MIN�	ULONG_MAX�	LLONG_MAX�	LLONG_MIN�
ULLONG_MAX�PY_SSIZE_T_MAX�PY_SSIZE_T_MINF���������gr�t���#@g�����3$@�hic@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Ze	j
eed
�d�dd��Z
dd�Zdd�ZdS)�ReadWriteTestscCsUdt_|jtjd�dt_|jtjd�|jtttdd�dS)NTF�T_BOOLr)�tsr!�assertEqual�assertRaises�	TypeError�setattr)�self�r(�</opt/alt/python35/lib64/python3.5/test/test_structmembers.py�	test_bools
		zReadWriteTests.test_boolcCsXtt_|jtjt�tt_|jtjt�tt_|jtjt�dS)N)rr"�T_BYTEr#rr�T_UBYTE)r'r(r(r)�	test_byte&s			zReadWriteTests.test_bytecCsXtt_|jtjt�tt_|jtjt�tt_|jtjt�dS)N)rr"�T_SHORTr#r	r
�T_USHORT)r'r(r(r)�
test_short.s			zReadWriteTests.test_shortcCsXtt_|jtjt�tt_|jtjt�tt_|jtjt�dS)N)rr"�T_INTr#rr
�T_UINT)r'r(r(r)�test_int6s			zReadWriteTests.test_intcCsXtt_|jtjt�tt_|jtjt�tt_|jtjt�dS)N)rr"�T_LONGr#rr�T_ULONG)r'r(r(r)�	test_long>s			zReadWriteTests.test_longcCs<tt_|jtjt�tt_|jtjt�dS)N)rr"�
T_PYSSIZETr#r)r'r(r(r)�test_py_ssize_tFs		zReadWriteTests.test_py_ssize_t�
T_LONGLONGzlong long not presentcCs�tt_|jtjt�tt_|jtjt�tt_|jtjt�dt_|jtjd�dt_|jtjd�dS)Nrr)rr"r9r#rr�T_ULONGLONG)r'r(r(r)�
test_longlongLs					zReadWriteTests.test_longlongc
Cs�ddddddddd	d
g
}ttd�rF|jddg�xGdd
digfD]0}x'|D]}|jttt||�qiWq\WdS)Nr!r+r,r.r/r1r2r4r5r7r9r:y������	@zfull of eels)�hasattrr"�extendr$r%r&)r'Zinteger_attributesZnonint�attrr(r(r)�test_bad_assignments\s	
z#ReadWriteTests.test_bad_assignmentscCsF|jtjd�|jtttdd�|jtttd�dS)Nr�T_STRING_INPLACE�s)r#r"r@r$r%r&�delattr)r'r(r(r)�test_inplace_stringnsz"ReadWriteTests.test_inplace_stringN)�__name__�
__module__�__qualname__r*r-r0r3r6r8�unittestZ
skipUnlessr<r"r;r?rCr(r(r(r)r s'r c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�TestWarningsc	Cs.tjdtf��tdt_WdQRXdS)N�r)r�check_warnings�RuntimeWarningrr"r+)r'r(r(r)�
test_byte_maxvszTestWarnings.test_byte_maxc	Cs.tjdtf��tdt_WdQRXdS)NrIr)rrJrKrr"r+)r'r(r(r)�
test_byte_minzszTestWarnings.test_byte_minc	Cs.tjdtf��tdt_WdQRXdS)NrIr)rrJrKrr"r,)r'r(r(r)�test_ubyte_max~szTestWarnings.test_ubyte_maxc	Cs.tjdtf��tdt_WdQRXdS)NrIr)rrJrKrr"r.)r'r(r(r)�test_short_max�szTestWarnings.test_short_maxc	Cs.tjdtf��tdt_WdQRXdS)NrIr)rrJrKr	r"r.)r'r(r(r)�test_short_min�szTestWarnings.test_short_minc	Cs.tjdtf��tdt_WdQRXdS)NrIr)rrJrKr
r"r/)r'r(r(r)�test_ushort_max�szTestWarnings.test_ushort_maxN)	rDrErFrLrMrNrOrPrQr(r(r(r)rHtsrH�__main__)rGZtestr�
import_modulerrrrrrr	r
rrr
rrrrrrrrr"ZTestCaser rHrD�mainr(r(r(r)�<module>s(
v	W