Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.135.187.121
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_poll.pyo
�
?��cc@s�ddlZddlZddlZyddlZWnek
rMdZnXddlZddlZddlm	Z	m
Z
mZmZyej
Wnek
r�ejd�nXd�Zdejfd��YZd�Zedkr�e�ndS(	i����N(tTESTFNtrun_unittesttreap_threadstcpython_onlys-select.poll not defined -- skipping test_pollcCs;g}x.|D]&\}}||@r
|j|�q
q
W|S(N(tappend(treadytflagtmatchtfdtmode((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pytfind_ready_matchings

t	PollTestscBs}eZd�Zd�Zd�Zd�Zed��Zej	e
d�ed���Zej	e
d�ed���Z
RS(cCstj�}d}d}t|�}g}g}i}i}x�t|�D]y}	tj�\}
}|j|
�|j|
tj�|j|tj	�|j
|
�|j
|�|||
<|
||<qIWg}x|r�|j�}
t|
tj	�}|std�nt
j|�}tj||�|j�}
t|
tj�}|sTtd�nt
j|�}
tj|
|�}|jt|�|�|j
|�tj||
�tj|
�|j||
�|j|
�|j||
�q�W|j||g|�dS(Nis This is a test.sno pipes ready for writingsno pipes ready for reading(tselecttpolltlentrangetostpipetregistertmodifytPOLLINtPOLLOUTRR
tRuntimeErrortrandomtchoicetwritetreadtassertEqualtcloset
unregistertremove(tselftpt	NUM_PIPEStMSGtMSG_LENtreaderstwriterstr2wtw2rtitrdtwrtbufsRt
ready_writerst
ready_readerstbuf((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyt
test_poll1sN



	


c	Cs�d}ytj|�Wntk
r*nXtj�}|j|�|j�}|j|d|tjf�tt	d�}|j
�}tj�}|j|�|j�}|j|dd|�|j�|j�}|j|d|tjf�tjt	�tj�}|jt
|j|�|jt
|j|�tj�}|jt|jd�tj�}dd	d��Y}dd
d��Y}|jt
|j|�d�|jt
|j|�d�dS(Ni*itwitNopecBseZRS((t__name__t
__module__(((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyR1pstAlmostcBseZd�ZRS(cSsdS(Ntfileno((R((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyR5ts(R2R3R5(((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyR4ss(((RRtOSErrorRR
RRtPOLLNVALtopenRR5tunlinktassertRaisest	TypeErrorRtKeyError(	RtFDR trtfRtpollsterR1R4((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pytpoll_unit_testsNs:




c	Csd}tj|d�}tj�}|j|tj�x�ddD]�}|j|�}|gkriqBn|d\}}|tj@r�|j�}|dkrB|jd�qBqBqB|tj@r�|j�}|sBPqBqBqB|jd
|�qBW|j	�dS(Ns?for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; doneR>ii�i�i�i@i�>i����i
ts6error: pipe seems to be closed, but still returns datas,Unexpected return value from select.poll: %s(ii�i�i�i@i�>(i����(
i����i����i����i����i����i����i����i����i����i����(
RtpopenRR
RRtPOLLHUPtreadlinetfailR(	RtcmdR R@ttouttfdlistRtflagstline((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyt
test_poll2}s*

cCs�tj�}|jd�|jt|jd
�d}|dkrQ|jd�n|jt|jdd	�|jt|jdd�|jt|jdd	�|jt|jdd
�dS(Nili@iiisOverflow must have occurredii����lill(RR
RR:t
OverflowErrorRFR(RR@tx((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyt
test_poll3�s
cCs�ddlm}m}m}tj�}|jd�|jt|jd|d�|jt|j	d|d�|jt|j|d�|jt|j|d�dS(Ni����(t	USHRT_MAXtINT_MAXtUINT_MAXii(
t	_testcapiRPRQRRRR
RR:RMR(RRPRQRRR@((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyttest_poll_c_limits�s
s!Threading required for this test.cCsJtj�\}}|jtj|�|jtj|�g}xCtd�D]5}tj|�}|jtj|�|j|�qKWtj�}x!|D]}|j	|tj
�q�Wtjd|j�}|j
�zUtjd�x|D]}|j|�q�W|j	|tj�|jt|j�Wdtj|d�|j�XdS(Ni
ttargetg�?tspam(RRt
addCleanupRRtdupRRR
RRt	threadingtThreadtstartttimetsleepRRR:RRtjoin(RR>R0trfdsR(RR@tt((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyttest_threaded_poll�s*



cCs�x�ddddgD]�}tj�\}}tj�}|j|tj�tjd|jd|f�}|j	�|j
dd�|j|j��tj
|d�|j
�|j|j��tj|�tj|�qWdS(	Ni���i����g�RUtargsttimeoutg�������?RV(tNoneRRRR
RRRYRZR[R^t
assertTruetis_aliveRtassertFalseR(Rt
timeout_msR>R0R@tpoll_thread((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyt!test_poll_blocks_with_negative_ms�s


(R2R3R/RARLRORRTtunittestt
skipUnlessRYRRaRj(((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyRs	1	/		cCstt�dS(N(RR(((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyt	test_main�st__main__(RRRRYtImportErrorRdR\Rkttest.test_supportRRRRR
tAttributeErrortSkipTestR
tTestCaseRRmR2(((s5/usr/local/python-2.7/lib/python2.7/test/test_poll.pyt<module>s$

"
	�	
© 2025 GrazzMean