%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_poll.pyo

ó
Nęáac@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((s*/usr/local/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((s*/usr/local/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__(((s*/usr/local/lib/python2.7/test/test_poll.pyR1pstAlmostcBseZd„ZRS(cSsdS(Ntfileno((R((s*/usr/local/lib/python2.7/test/test_poll.pyR5ts(R2R3R5(((s*/usr/local/lib/python2.7/test/test_poll.pyR4ss(((RRtOSErrorRR
RRtPOLLNVALtopenRR5tunlinktassertRaisest	TypeErrorRtKeyError(	RtFDR trtfRtpollsterR1R4((s*/usr/local/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((s*/usr/local/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((s*/usr/local/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@((s*/usr/local/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((s*/usr/local/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((s*/usr/local/lib/python2.7/test/test_poll.pyt!test_poll_blocks_with_negative_msĐs


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

"
	Ě	

Zerion Mini Shell 1.0