Your IP : 216.73.216.213


Current Path : /proc/242857/root/opt/alt/python34/lib64/python3.4/test/__pycache__/
Upload File :
Current File : //proc/242857/root/opt/alt/python34/lib64/python3.4/test/__pycache__/test___future__.cpython-34.pyc

�
g f�	�@svddlZddlmZddlZdZejZGdd�dej�Zd	d
�Z	e
dkrre	�ndS)
�N)�support�alpha�beta�	candidate�finalc@s(eZdZdd�Zdd�ZdS)�
FutureTestcCs�tdd�}xntt�D]`}tt|d�}|dk	rt|tj�r|j||kd|�|j|�qqW|jt	|�dd|�dS)Nz(%r should have been in all_feature_namesrz"all_feature_names has too much: %r)
�features�dir�
__future__�getattr�
isinstanceZ_Feature�
assertTrue�remove�assertEqual�len)�selfZgiven_feature_names�name�obj�r�9/opt/alt/python34/lib64/python3.4/test/test___future__.py�
test_namess	zFutureTest.test_namescs�x�tD]�}tt|�}|j�}|j�}|j�|j���fdd�}||d�|dk	r�||d��||kd�n�t|d�d�tdd	d
|j	��t
t|d�t�d�qWdS)Ncs��t|t�d|��t|�dd|�|\}}}}}�t|t�d|��t|t�d|��t|t�d|��t|t�d|��|tkd|��t|t�d	|�dS)
Nz%s isn't tuple�z%s isn't 5-tuplez%s major isn't intz%s minor isn't intz%s micro isn't intz%s level isn't stringz!%s level string has unknown valuez%s serial isn't int)r�tupler�int�str�GOOD_SERIALS)�tr�major�minor�micro�level�serial)�a�err�check"sz)FutureTest.test_attributes.<locals>.check�optional�	mandatoryz8optional not less than mandatory, and mandatory not None�
compiler_flagz(feature is missing a .compiler_flag attr�z<test>�execz.compiler_flag isn't int)rrr
ZgetOptionalReleaseZgetMandatoryReleaser
r�hasattr�compiler'rr)rZfeature�valuer%r&r$r)r"r#r�test_attributess"
		



zFutureTest.test_attributesN)�__name__�
__module__�__qualname__rr-rrrrr	srcCstjt�dS)N)rZrun_unittestrrrrr�	test_main=sr1�__main__)rrz	candidatezfinal)ZunittestZtestrr
rZall_feature_namesrZTestCaserr1r.rrrr�<module>s	4