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: 18.218.150.40
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_kqueue.pyo
�
?��cc@s�dZddlZddlZddlZddlZddlZddlZddlmZe	ed�sej
d��ndejfd��YZd�Z
ed	kr�e
�ndS(
s
Tests for kqueue wrapper.
i����N(ttest_supporttkqueuestest works only on BSDt
TestKQueuecBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCsptj�}|j|j�dk|j��|j|j�|j�|j|j�|jt|j�dS(Ni(tselectRt
assertTruetfilenotclosedtclosetassertRaisest
ValueError(tselftkq((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyttest_create_queues"
cCs�tjj�}tj|�}tjd�}|j|j|�|j|jtj�|j|j	tj
�|j|jd�|j|jd�|j|j
d�|j||�|j||�|jt||�d�|j||k�|j||k�|jt|d�d�|jt|d�d�|jt|d�d�|jt|d�td|��|jt|d�td|��|jt|d�td|��tj|tj�}|j|j|�|j|jtj�|j|j	tj
�|j|jd�|j|jd�|j|j
d�|j||�|j||�tj|tjtj�}|j|j|�|j|jtj�|j|j	tj�|j|jd�|j|jd�|j|j
d�|j||�|j||�tjddddd	d
�}|j|jd�|j|jd�|j|j	d�|j|jd�|j|jd	�|j|j
d
�|j||�|j||�d}tj|ddd|d|�}|j|j|�|j|jd�|j|j	d�|j|jd�|j|j|d�|j|j
|�|j||�|j||�d}tjdd|�}|j|jd�|j|jd�|j|j	|�|j|jd�|j|jd�|j|j
d�|j||�|j||�d
}tjddd|�}|j|jd�|j|jd�|j|j	d�|j|j|�|j|jd�|j|j
d�|j||�|j||�dS(Ni�ii����iteviiiiii�i��I����(tsyststderrRRtkeventtassertEqualtidenttfiltertKQ_FILTER_READtflagst	KQ_EV_ADDtfflagstdatatudatatassertNotEqualtcmpRtNonetKQ_FILTER_WRITEt
KQ_EV_ONESHOT(R
tfdR
tothertbignum((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyttest_create_events�###"cCstj�}|jd�|jd�tj�}|jt�y!|jd|j�df�Wn0tjk
r�}|j|j	dt
j�nX|j�\}}t
j�}t
jj|j��}t
j|j�t
jt
jt
jB�}|j|gd�t
j|j�t
jt
jt
jB�}|j|gd�t
j|j�t
jt
jt
jB�}|j|gd�t
j|j�t
jt
jt
jB�}|j|gd�|jddd�}	td�|	D��}	|j|	t|j�t
jf|j�t
jfg��|jd�|jd�xYtd�D]>}
|jddd�}	t|	�dkrrPntjd	�qAW|jd
�td�|	D��}	|j|	t|j�t
jf|j�t
jf|j�t
jf|j�t
jfg��t
j|j�t
jt
j�}|j|gd�t
j|j�t
jt
j�}|j|gd�t
j|j�t
jt
j�}|j|gdd�|jgdd�}	td
�|	D��}	|j|	t|j�t
jfg��|j �|j �|j �dS(Ns	127.0.0.1iiicss!|]}|j|jfVqdS(N(RR(t.0te((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pys	<genexpr>�ssHello!sworld!!!i
g�?s'timeout waiting for event notificationscss!|]}|j|jfVqdS(N(RR(R#R$((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pys	<genexpr>�sg�G�z��?css!|]}|j|jfVqdS(N(RR(R#R$((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pys	<genexpr>�s(s	127.0.0.1i(!tsockettbindtlistentsetblockingtFalsetconnecttgetsocknameterrorRtargsterrnotEINPROGRESStacceptRRtfromfdRRRRtKQ_EV_ENABLEtcontrolRRtsettsendtrangetlenttimetsleeptfailtKQ_EV_DELETER(R
tserverSockettclientR$tservertaddrRtkq2R
teventsti((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyttest_queue_eventps�


!




cCs�tj�}tj�\}}|jd�tj|tjtjtjB�}tj|tjtjtjB�}|j	||gdd�}|j
|�|j|djtj
@�|j|j|dj�d�|j�|j�|j�dS(Ntfooii(RRR%t
socketpairR5RRRR2R3RtassertFalseRtKQ_EV_ERRORRtrecvRR(R
Rtatbtevent1tevent2tr((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyttestPair�s
""
 

cs�tj�}tj�\}}tj|tjtjtjB��|j�gd�|j�fd�dd�fd��Y}|j|�d�|jt	�g�d�|j
�|j
�|j
�dS(NitBadListcs eZd�Z�fd�ZRS(cSsdS(Ni((R
((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyt__len__�sc3s xtd�D]}�Vq
WdS(Nid(R6(R
RB(R
(s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyt__iter__�s(t__name__t
__module__RPRQ((R
(s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyRO�s	((RRR%RERRRR2R3titerR(R
RRIRJRO((R
s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyttest_issue30058�s"

(RRRSRR"RCRNRU(((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyRs
		X	S	cCstjt�dS(N(Rtrun_unittestR(((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyt	test_main�st__main__(t__doc__R%R.R8RRtunittestttestRthasattrtSkipTesttTestCaseRRWRR(((s7/usr/local/python-2.7/lib/python2.7/test/test_kqueue.pyt<module>s�	
© 2025 GrazzMean