ó {G_Tc@sřddlZddlZddlZyddlZWnek rMdZnXddlZddlZddlm Z m Z m Z m Z y ej 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ƒe d„ƒƒZ RS(cCstjƒ}d}d}t|ƒ}g}g}i}i}x‡t|ƒD]y} tjƒ\} } |j| ƒ|j| tjƒ|j| tj ƒ|j | ƒ|j | ƒ| || <| || 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—Wt j 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*     ( R2R3R/RARLRORRTtunittestt skipUnlessRYRRa(((s*/usr/local/lib/python2.7/test/test_poll.pyR s 1 /   cCsttƒdS(N(RR (((s*/usr/local/lib/python2.7/test/test_poll.pyt test_mainŃst__main__(RRR RYt ImportErrortNoneR\Rbttest.test_supportRRRRR tAttributeErrortSkipTestR tTestCaseR RdR2(((s*/usr/local/lib/python2.7/test/test_poll.pyts$       "   ś