Your IP : 216.73.216.52


Current Path : /opt/alt/python36/lib64/python3.6/test/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/test/__pycache__/test_select.cpython-36.pyc

3

� f�
�@s|ddlZddlZddlZddlZddlZddlmZejejdd�dkd�Gdd�dej	��Z
dd	�Zed
krxej
�dS)�N)�support��winz can't easily test on this systemc@sdeZdZGdd�d�ZGdd�d�Zdd�Zejej	j
d�d�d	d
��Zdd�Zd
d�Z
dd�ZdS)�SelectTestCasec@seZdZdS)zSelectTestCase.NopeN)�__name__�
__module__�__qualname__�r	r	�5/opt/alt/python36/lib64/python3.6/test/test_select.py�Nopesrc@seZdZdd�ZdS)zSelectTestCase.AlmostcCsdS)N�filenor	)�selfr	r	r
rszSelectTestCase.Almost.filenoN)rrrrr	r	r	r
�AlmostsrcCsx|jttjddd�|jttj|j�ggg�|jttj|j�ggg�|jttjgggd�|jttjgggd�dS)N��rznot a number���)ZassertRaises�	TypeError�selectrr�
ValueError)r
r	r	r
�test_error_conditionss
z$SelectTestCase.test_error_conditionsZfreebsdz*skip because of a FreeBSD bug: kern/155606cCs~ttd��j}|j�}|j�ytj|gggd�Wn2tk
rd}z|j|jtj�WYdd}~XnX|j	d�WdQRXdS)N�rbrzexception not raised)
�open�__file__r�closer�OSError�assertEqual�errnoZEBADF�fail)r
�fp�fd�errr	r	r
�
test_errnos"zSelectTestCase.test_errnocCs>tjgggd�\}}}|j||�|j||�|j||�dS)Nr)rZassertIsNot)r
�r�w�xr	r	r
�test_returned_list_identity(sz*SelectTestCase.test_returned_list_identitycCs�d}tj|d�}x�dD]�}tjr*td
|�tj|ggg|�\}}}|||fgggfkrXq|||f|gggfkr�|j�}tjr�tt|��|stjr�td�Pq|jd|||�qW|j	�dS)Nz?for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; doner"rrr����
z	timeout =ZEOFz'Unexpected return values from select():)rrrr&r'r()N)
NNNNNNNNNN)rrrr&r'r(NNNNNNNNNN)
�os�popenr�verbose�printr�readline�reprrr)r
�cmd�pZtoutZrfdZwfdZxfd�liner	r	r
�test_select/s&

zSelectTestCase.test_selectcsRg�G�fdd�d�}|�gd�dd�<|jtjg�g�g�dd�gf�dS)NcseZdZ�fdd�ZdS)z-SelectTestCase.test_select_mutated.<locals>.Fcs�d=tjj�S)Nrr)�sys�
__stdout__r)r
)�ar	r
rHsz4SelectTestCase.test_select_mutated.<locals>.F.filenoN)rrrrr	)r6r	r
�FGsr7r)�)rr)r
r7r	)r6r
�test_select_mutatedEsz"SelectTestCase.test_select_mutatedN)rrrrrr�unittest�skipIfr4�platform�
startswithr!r%r3r9r	r	r	r
rsrcCstj�dS)N)rZ
reap_childrenr	r	r	r
�tearDownModuleNsr>�__main__)rr*rr4r:Ztestrr;r<ZTestCaserr>r�mainr	r	r	r
�<module>s
D