%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/test_kqueue.pyo

ó
Nêáac@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((s,/usr/local/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((s,/usr/local/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((s,/usr/local/lib/python2.7/test/test_kqueue.pys	<genexpr>”ssHello!sworld!!!i
gð?s'timeout waiting for event notificationscss!|]}|j|jfVqdS(N(RR(R#R$((s,/usr/local/lib/python2.7/test/test_kqueue.pys	<genexpr>¥sg®Gáz®ï?css!|]}|j|jfVqdS(N(RR(R#R$((s,/usr/local/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((s,/usr/local/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((s,/usr/local/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
((s,/usr/local/lib/python2.7/test/test_kqueue.pyt__len__Þsc3s xtdƒD]}ˆVq
WdS(Nid(R6(R
RB(R
(s,/usr/local/lib/python2.7/test/test_kqueue.pyt__iter__às(t__name__t
__module__RPRQ((R
(s,/usr/local/lib/python2.7/test/test_kqueue.pyROÝs	((RRR%RERRRR2R3titerR(R
RRIRJRO((R
s,/usr/local/lib/python2.7/test/test_kqueue.pyttest_issue30058Ós"

(RRRSRR"RCRNRU(((s,/usr/local/lib/python2.7/test/test_kqueue.pyRs
		X	S	cCstjtƒdS(N(Rtrun_unittestR(((s,/usr/local/lib/python2.7/test/test_kqueue.pyt	test_mainëst__main__(t__doc__R%R.R8RRtunittestttestRthasattrtSkipTesttTestCaseRRWRR(((s,/usr/local/lib/python2.7/test/test_kqueue.pyt<module>sÜ	

Zerion Mini Shell 1.0