a 8êdgTŒã@sdZddlZddlZddlZddlZddlmZddlZddlmZddlm Z ddlm Z ddlm Z ddlm Z dd l mZdd lmZdd lmZd d „Zdd„ZGdd„dejƒZGdd„dejƒZGdd„dejƒZe ejdkd¡Gdd„dejƒƒZedkre ¡dS)zTests for proactor_events.pyéN)Úmock)ÚBaseProactorEventLoop)Ú_ProactorSocketTransport)Ú_ProactorWritePipeTransport)Ú_ProactorDuplexPipeTransport)Ú_ProactorDatagramTransport)Úsupport)Ú socket_helper)ÚutilscCst d¡dS©N)ÚasyncioZset_event_loop_policy©r r úB/usr/local/lib/python3.9/test/test_asyncio/test_proactor_events.pyÚtearDownModulesrcCs"|jdurdS|j ¡d|_dSr )Ú_sockÚclose)Ú transportr r rÚclose_transports  rcsbeZdZ‡fdd„ZdRdd„Zdd„Zdd „Zd d „Zd d „Zdd„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Ze d ¡d!d"„ƒZd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Ze d/¡d0d1„ƒZd2d3„Zd4d5„Zd6d7„Zd8d9„Zd:d;„Z dd?„Z"d@dA„Z#dBdC„Z$dDdE„Z%dFdG„Z&dHdI„Z'dJdK„Z(dLdM„Z)dNdO„Z*dPdQ„Z+‡Z,S)SÚProactorSocketTransportTestscsVtƒ ¡| ¡|_| |jj¡t ¡|_|j|j_ t   t j ¡|_t tj¡|_dSr )ÚsuperÚsetUpÚ new_test_loopÚloopÚ addCleanuprrÚMockÚproactorÚ _proactorÚ test_utilsÚmake_test_protocolr ÚProtocolÚprotocolÚsocketÚsock©Úself©Ú __class__r rr#s    z"ProactorSocketTransportTests.setUpNcCs&t|j|j|j|d}| t|¡|S)N©Úwaiter)rrr"r rr)r$r(rr r rÚsocket_transport,s  ÿ z-ProactorSocketTransportTests.socket_transportcCsR|j ¡}|j|d}t |j¡| | ¡¡|j |¡|j j   |j d¡dS)Nr'é€) rÚ create_futurer)rÚ run_brieflyÚ assertIsNoneÚresultr Úconnection_maderÚrecvÚassert_called_withr"©r$ÚfutÚtrr r rÚ test_ctor2s     z&ProactorSocketTransportTests.test_ctorcCsH| ¡}| ¡|jjj |jd¡| |jj j ¡| |jj j ¡dS)Nr*) r)Ú _loop_readingrrr0r1r"Ú assertFalser Ú data_receivedÚcalledÚ eof_received©r$r4r r rÚtest_loop_reading:s z.ProactorSocketTransportTests.test_loop_readingcCsR|j ¡}| d¡| ¡}||_| |¡|jjj |j d¡|j j  d¡dS)Nódatar*) rr+Ú set_resultr)Ú _read_futr6rr0r1r"r r8©r$Úresr4r r rÚtest_loop_reading_dataAs   z3ProactorSocketTransportTests.test_loop_reading_datacCsz|j ¡}| d¡| ¡}| t|j|¡t ¡|_ ||_ | |¡|  |jj j j¡| |jjj¡| |j j¡dS©Nó)rr+r>r)Ú assertRaisesÚAssertionErrorr6rrrr?r7rr0r9Ú assertTruer r:r@r r rÚtest_loop_reading_no_dataKs    z6ProactorSocketTransportTests.test_loop_reading_no_datacCs>tƒ}|jjj_| ¡}t ¡|_|  ¡|j  |d¡dS©Nz"Fatal read error on pipe transport) ÚConnectionAbortedErrorrrr0Ú side_effectr)rrÚ _fatal_errorr6r1©r$Úerrr4r r rÚtest_loop_reading_abortedYs þz6ProactorSocketTransportTests.test_loop_reading_abortedcCs@tƒ|jjj_| ¡}d|_t ¡|_ |  ¡|  |j j ¡dS©NT) rJrrr0rKr)Ú_closingrrrLr6r7r9r;r r rÚ!test_loop_reading_aborted_closingcs  z>ProactorSocketTransportTests.test_loop_reading_aborted_closingcCs@tƒ|jjj_| ¡}d|_t ¡|_ |  ¡|  |j j ¡dS©NF) rJrrr0rKr)rQrrrLr6rGr9r;r r rÚ"test_loop_reading_aborted_is_fatalls  z?ProactorSocketTransportTests.test_loop_reading_aborted_is_fatalcCsZtƒ}|jjj_| ¡}d|_t ¡|_ t ¡|_ |  ¡|  |j j ¡|j  |¡dSrS)ÚConnectionResetErrorrrr0rKr)rQrrrLÚ _force_closer6r7r9r1rMr r rÚ!test_loop_reading_conn_reset_lostts  z>ProactorSocketTransportTests.test_loop_reading_conn_reset_lostcCs>tƒ}|jjj_| ¡}t ¡|_|  ¡|j  |d¡dSrI) ÚOSErrorrrr0rKr)rrrLr6r1rMr r rÚtest_loop_reading_exceptions þz8ProactorSocketTransportTests.test_loop_reading_exceptioncCs<| ¡}t ¡|_| d¡| |jd¡|jjdddS)Nr=)Údata)r)rrÚ _loop_writingÚwriteÚ assertEqualÚ_bufferr1r;r r rÚ test_write‰s   z'ProactorSocketTransportTests.test_writecCs"| ¡}| d¡| |j¡dSrC)r)r\r7r^r;r r rÚtest_write_no_datas z/ProactorSocketTransportTests.test_write_no_datacCsF| ¡}t ¡|_t ¡|_| d¡| |jd¡| |jj ¡dS©Nr=) r)rrÚ _write_futr[r\r]r^r7r9r;r r rÚtest_write_more•s    z,ProactorSocketTransportTests.test_write_morecCsH| ¡}tdƒ|_| ¡|jjj |jd¡|jjjj j  |j¡dSra) r)Ú bytearrayr^r[rrÚsendr1r"Ú return_valueÚadd_done_callbackr;r r rÚtest_loop_writings ÿz.ProactorSocketTransportTests.test_loop_writingúasyncio.proactor_events.loggercCsštƒ}|jjj_| ¡}t ¡|_ddg|_ |  ¡|j  |d¡d|_ |  d¡|  d¡|  d¡|  d¡|  d¡| |j d¡|j  d¡dS)Nsdastaz#Fatal write error on pipe transportér=zsocket.send() raised exception.)rXrrrerKr)rrrLr^r[r1Ú _conn_lostr\r]Úwarning)r$Úm_logrNr4r r rÚtest_loop_writing_err¥s"  þ     z2ProactorSocketTransportTests.test_loop_writing_errcCs<|j ¡}| d¡| ¡}||_| |¡| |j¡dSra)rr+r>r)rbr[r-r2r r rÚtest_loop_writing_stop¹s    z3ProactorSocketTransportTests.test_loop_writing_stopcCs^|j ¡}| d¡| ¡}||_| ¡| |¡| |j¡t  |j¡|j j   d¡dS©Nrj) rr+r>r)rbrr[r-rr,r Úconnection_lostr1r2r r rÚtest_loop_writing_closingÂs     z6ProactorSocketTransportTests.test_loop_writing_closingcCs*| ¡}t ¡|_| ¡|j d¡dSr )r)rrrVÚabortr1r;r r rÚ test_abortÎs z'ProactorSocketTransportTests.test_abortcCsz| ¡}| ¡t |j¡|jj d¡| |  ¡¡|  |j d¡|jj  ¡| ¡t |j¡|  |jjj¡dSrp)r)rrr,rr rqr1rGÚ is_closingr]rkÚ reset_mockr7r9r;r r rÚ test_closeÔs   z'ProactorSocketTransportTests.test_closecCs:| ¡}t ¡|_| ¡t |j¡| |j j j ¡dSr ) r)rrrbrrr,rr7r rqr9r;r r rÚtest_close_write_futás   z1ProactorSocketTransportTests.test_close_write_futcCs8| ¡}dg|_| ¡t |j¡| |jjj ¡dSra) r)r^rrr,rr7r rqr9r;r r rÚtest_close_bufferès  z.ProactorSocketTransportTests.test_close_bufferúasyncio.base_events.loggercCs<| ¡}t ¡|_| d¡| |jj¡| |jj¡dSr )r)rrrVrLrGr9Úerror)r$Z m_loggingr4r r rÚtest_fatal_errorïs   z-ProactorSocketTransportTests.test_fatal_errorcCs„| ¡}dg|_t ¡}|_t ¡}|_| d¡|j ¡|j ¡t   |j ¡|j j  d¡| d|j¡| |jd¡dS)Nr=rj)r)r^rrr?rbrVÚcancelr1rr,rr rqr]rk)r$r4Zread_futZ write_futr r rÚtest_force_close÷s    z-ProactorSocketTransportTests.test_force_closecCsft ¡}|j |¡|j ¡}| d¡||jj_|  ¡}|  d¡|  d¡t   |j¡| ¡dS)Nrjr=)rrrZset_exception_handlerr+r>rrerfr)r\rVrr,Úassert_not_called)r$Z exc_handlerr3r4r r rÚtest_loop_writing_force_closes       z:ProactorSocketTransportTests.test_loop_writing_force_closecCs8| ¡}d|_| d¡t |j¡| |jjj ¡dSrP) r)rQrVrr,rr7r rqr9r;r r rÚtest_force_close_idempotents   z8ProactorSocketTransportTests.test_force_close_idempotentcCsF| ¡}dg|_| d¡t |j¡|jj d¡|  d|j¡dSra) r)r^rVrr,rr rqr1r]r;r r rÚtest_fatal_error_2s   z/ProactorSocketTransportTests.test_fatal_error_2cCs6| ¡}| d¡| |jjj¡| |jjj¡dSr )r)Z_call_connection_lostrGr rqr9r"rr;r r rÚtest_call_connection_lost"s z6ProactorSocketTransportTests.test_call_connection_lostcCsT| ¡}| | ¡¡| ¡|jj tj¡| ¡|  |jjj d¡|  ¡dSrp) r)rGÚ can_write_eofÚ write_eofr"Úshutdownr1r!ÚSHUT_WRr]Z call_countrr;r r rÚtest_write_eof(sz+ProactorSocketTransportTests.test_write_eofcCs| ¡}|j ¡}||jjj_| d¡| ¡|  |j ¡|  |j j j¡|jjj |j d¡| d¡|j ¡|j j  tj¡| ¡dS©Nr=é)r)rr+Ú_looprrerfr\r…rGZ _eof_writtenr7r"r†r9r1r>Ú _run_oncer!r‡r©r$r4Úfr r rÚtest_write_eof_buffer1s      z2ProactorSocketTransportTests.test_write_eof_buffercCs\t|j|j|jƒ}| | ¡¡| ¡| | ¡¡|j ¡| |jj j ¡|  ¡dSr ) rrr"r rGr„r…rurŒrr9r;r r rÚtest_write_eof_write_pipe?s ÿ z6ProactorSocketTransportTests.test_write_eof_write_pipecCs¦t|j|j|jƒ}|j ¡}||jjj_|  d¡|  ¡|  |  ¡¡|  |jjj¡|jjj |jd¡| d¡|j ¡|j ¡|  |jjj¡| ¡dSr‰)rrr"r r+r‹rrerfr\r…rGrur7r†r9r1r>rŒrrr r rÚ test_write_eof_buffer_write_pipeIs      z=ProactorSocketTransportTests.test_write_eof_buffer_write_pipecCs^t|j|j|jƒ}| | ¡¡| t¡| ¡Wdƒn1sH0Yt |ƒdSr ) rrr"r r7r„rEÚNotImplementedErrorr…rr;r r rÚtest_write_eof_duplex_pipeXs ÿ &z7ProactorSocketTransportTests.test_write_eof_duplex_pipecCs˜| ¡}g}dD]"}|j ¡}| |¡| |¡q||jjj_|j ¡|  |j ¡|  |  ¡¡|j ¡|j j d¡|j ¡|j j d¡| ¡| ¡|  |j ¡|  |  ¡¡tdƒD]}|j ¡qÆ|j j d¡| ¡| ¡|  |j ¡|  |  ¡¡|j ¡|j j d¡|j ¡|j j d¡| ¡| ¡t ¡|j_|j ¡|jj ¡|j j d¡| ¡|  |  ¡¡dS)N)ódata1ódata2ódata3ódata4ódata5rDr”r•é r–r—r˜)r)rr+r>Úappendrr0rKrŒr7Z_pausedrGZ is_readingr r8r1Z pause_readingÚrangeZresume_readingrrÚcall_exception_handlerrr)r$r4ÚfuturesÚmsgrŽÚir r rÚtest_pause_resume_reading`sJ                 z6ProactorSocketTransportTests.test_pause_resume_readingcCsH| ¡}|j|d| | ¡d¡| |jjj¡| |jjj¡|S)N©Úhighr) r)Zset_write_buffer_limitsr]Úget_write_buffer_sizer7r Ú pause_writingr9Úresume_writing)r$r¢r4r r rÚpause_writing_transports  z4ProactorSocketTransportTests.pause_writing_transportcCs~|jdd}|j ¡}||jjj_| d¡|j ¡| |j j j ¡|  d¡|j ¡|  | ¡d¡| |j jj ¡dS)NrŠr¡s large datar)r¦rr+rrerfr\rŒrGr r¤r9r>r]r£r¥©r$r4r3r r rÚtest_pause_resume_writing–s       z6ProactorSocketTransportTests.test_pause_resume_writingcCsŽ|jdd}|j ¡}||jjj_| d¡|j ¡| |  ¡d¡|  |j j j ¡| d¡|j ¡| |  ¡d¡| |j j j ¡dS)NrŠr¡s123éóabcé©r¦rr+rrerfr\rŒr]r£r7r r¤r9rG)r$r4Zfut1r r rÚtest_pause_writing_2write¦s       z6ProactorSocketTransportTests.test_pause_writing_2writecCsÂ|jdd}|j ¡}||jjj_| d¡|j ¡| |  ¡d¡|  |j j j ¡| d¡|j ¡| |  ¡d¡|  |j j j ¡| d¡|j ¡| |  ¡d¡| |j j j ¡dS) NrŠr¡ó1rjs23r©rªr«r¬r§r r rÚtest_pause_writing_3write·s         z6ProactorSocketTransportTests.test_pause_writing_3writecCsd|jdd}|j ¡}| d¡||jjj_| d¡|j ¡|  |  ¡d¡|  |j j j¡dS)NrŠr¡svery large datar)r¦rr+r>rrerfr\rŒr]r£r7r r¤r9r§r r rÚtest_dont_pause_writingÎs      z4ProactorSocketTransportTests.test_dont_pause_writing)N)-Ú__name__Ú __module__Ú __qualname__rr)r5r<rBrHrOrRrTrWrYr_r`rcrhrÚpatchrnrorrrtrwrxryr|r~r€rr‚rƒrˆrrr‘r“r r¦r¨r­r¯r°Ú __classcell__r r r%rr!sR               - rcsÊeZdZ‡fdd„Zd,dd„Zdd„Zdd „Zd d „Zd d „Zdd„Z dd„Z dd„Z e   d¡dd„ƒZdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Ze   d)¡d*d+„ƒZ‡ZS)-ÚProactorDatagramTransportTestscsTtƒ ¡| ¡|_t ¡|_|j|j_t  t j ¡|_ tjt j d|_d|jj_dS)N)Zspec_seté)rrrrrrrrrrr ÚDatagramProtocolr r!r"Úfilenorfr#r%r rrÞs    z$ProactorDatagramTransportTests.setUpNcCs8|rdnt|jj_t|j|j|j|d}| t|¡|S)N©Úaddress) rXr"Ú getpeernamerKrrr rr)r$r»rr r rÚdatagram_transportçs þ z1ProactorDatagramTransportTests.datagram_transportcCsBd}| ¡}| |d¡| |jjj¡|jjj|j|dddS©Nr=)ú0.0.0.0iÒ©Úaddr)r½ÚsendtorGrr9r1r"©r$rZrr r rÚ test_sendtoïs ÿz*ProactorDatagramTransportTests.test_sendtocCsFtdƒ}| ¡}| |d¡| |jjj¡|jjj|jddddSr¾)rdr½rÂrGrr9r1r"rÃr r rÚtest_sendto_bytearray÷s ÿz4ProactorDatagramTransportTests.test_sendto_bytearraycCsFtdƒ}| ¡}| |d¡| |jjj¡|jjj|jddddSr¾)Ú memoryviewr½rÂrGrr9r1r"rÃr r rÚtest_sendto_memoryviewÿs ÿz5ProactorDatagramTransportTests.test_sendto_memoryviewcCsH| ¡}|j d¡| dd¡| |jjj¡| dgt|jƒ¡dS)N)r=©r¿i90rDr ) r½r^ršrÂr7r"r9r]Úlist©r$rr r rÚtest_sendto_no_datas   ÿz2ProactorDatagramTransportTests.test_sendto_no_datacCsR| ¡}|j d¡tƒ|_| dd¡| |jjj¡|  ddgt |jƒ¡dS)N©r”rÈr•rÈ©r•rÈ) r½r^ršÚobjectrbrÂr7rr9r]rÉrÊr r rÚtest_sendto_buffers  ÿýz1ProactorDatagramTransportTests.test_sendto_buffercCsptdƒ}| ¡}|j d¡tƒ|_| |d¡| |jjj ¡|  ddgt |jƒ¡|  |jddt ¡dS©Nr•rÌrÈrÍrjr)rdr½r^ršrÎrbrÂr7rr9r]rÉÚassertIsInstanceÚbytes©r$Zdata2rr r rÚtest_sendto_buffer_bytearrays  ÿýz;ProactorDatagramTransportTests.test_sendto_buffer_bytearraycCsptdƒ}| ¡}|j d¡tƒ|_| |d¡| |jjj ¡|  ddgt |jƒ¡|  |jddt ¡dSrÐ)rÆr½r^ršrÎrbrÂr7rr9r]rÉrÑrÒrÓr r rÚtest_sendto_buffer_memoryview's  ÿýzr½r?r6rrr1r"r rrr@r r rÚtest_datagram_loop_reading_dataMs   z:BaseProactorEventLoopTests.test_datagram_loop_reading_datacCs‚|j ¡}| d¡| ¡}| t|j|¡t ¡|_ ||_ | |¡|  |jj j j¡| |jjj¡| |j j¡t|ƒdS)N)rDr)rr+r>r½rErFr6rrrr?rGrrr9r7r rÝrr@r r rÚ"test_datagram_loop_reading_no_dataXs    z=BaseProactorEventLoopTests.test_datagram_loop_reading_no_datacCsRtƒ}|jjj_| ¡}t ¡|_t ¡|j _ |  ¡|j j   |¡t |ƒdSr )rJrrrrKr½rrrLÚ _protocolrÝr6r1rrMr r rÚ"test_datagram_loop_reading_abortedgs  z=BaseProactorEventLoopTests.test_datagram_loop_reading_abortedcCs^tƒ}|jjj_| ¡}t ¡|_t ¡|j _ |j   d¡|  ¡|j j  |¡t|ƒdS)N)sHellor)rJrrrÂrKr½rrrLrrÝr^rr[r1rrMr r rÚ"test_datagram_loop_writing_abortedqs   z=BaseProactorEventLoopTests.test_datagram_loop_writing_aborted)r±r²r³rrr´r5rørwrúrýrþrÿrrr r r r½r rrrrrrrµr r r%rrì¦s.          rìÚwin32z%Proactor is supported on Windows onlycsˆeZdZddZGdd„dejƒZe‡fdd„ƒZe‡fdd„ƒZ ‡fd d „Z dd d „Z dd„Z dd„Z dd„Zdd„Zdd„Z‡ZS)Ú&ProactorEventLoopUnixSockSendfileTestss 12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcde12345abcdeéc@s4eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd S) z.ProactorEventLoopUnixSockSendfileTests.MyProtocCs(d|_d|_tƒ|_| ¡|_d|_dSrS)ÚstartedÚclosedrdrZr+r3r)r$rr r rÚ__init__„s  z7ProactorEventLoopUnixSockSendfileTests.MyProto.__init__cCsd|_||_dSrP)rrrÊr r rr/‹sz>ProactorEventLoopUnixSockSendfileTests.MyProto.connection_madecCs|j |¡dSr )rZÚextend)r$rZr r rr8sz)r$Úexcr r rrq’sz>ProactorEventLoopUnixSockSendfileTests.MyProto.connection_lostcÃs|jIdHdSr )r3r#r r rÚ wait_closed–sz:ProactorEventLoopUnixSockSendfileTests.MyProto.wait_closedN)r±r²r³r r/r8rqr#r r r rÚMyProto‚s r$csFttjdƒ}| |j¡Wdƒn1s.0Ytƒ ¡dS)NÚwb)ÚopenrÚTESTFNr\ÚDATArÚ setUpClass)ÚclsÚfpr%r rr)™s*z1ProactorEventLoopUnixSockSendfileTests.setUpClasscst tj¡tƒ ¡dSr )rÚunlinkr'rÚ tearDownClass)r*r%r rr-Ÿs z4ProactorEventLoopUnixSockSendfileTests.tearDownClasscsNt ¡|_| |j¡| |jj¡ttjdƒ|_ | |j j¡t ƒ  ¡dS)NÚrb) r ZProactorEventLooprrñrrr&rr'Úfilerrr#r%r rr¤s   z,ProactorEventLoopUnixSockSendfileTests.setUpTcCsRt tjtj¡}| d¡| tjtjd¡| tjtjd¡|rN| |j ¡|S)NFr) r!ÚAF_INETÚ SOCK_STREAMÚ setblockingÚ setsockoptÚ SOL_SOCKETÚ SO_SNDBUFÚ SO_RCVBUFrr)r$Úcleanupr"r r rÚ make_socket¬s  z2ProactorEventLoopUnixSockSendfileTests.make_socketcCs |j |¡Sr )rZrun_until_complete)r$Úcoror r rÚrun_loopµsz/ProactorEventLoopUnixSockSendfileTests.run_loopcsŽˆ ¡}ˆ ˆj¡‰t ¡}ˆjdd}| d|f¡ˆ ˆjj‡fdd„|d¡‰ˆ ˆj ||  ¡¡¡‡‡‡fdd„}ˆ  |¡|ˆfS) NF)r7rcsˆSr r r )Úprotor rÚ¿rDz@ProactorEventLoopUnixSockSendfileTests.prepare..)r"cs<ˆjdur"ˆj ¡ˆ ˆ ¡¡ˆ ¡ˆ ˆ ¡¡dSr )rrr:r#r ©r;r$Zserverr rr7Âs   z?ProactorEventLoopUnixSockSendfileTests.prepare..cleanup) r8r$rr Zfind_unused_portÚbindr:Ú create_serverZ sock_connectÚ getsocknamer)r$r"ÚportZsrv_sockr7r r=rÚprepare¸s    ÿ z.ProactorEventLoopUnixSockSendfileTests.preparec Csn| ¡\}}tƒ}| tjd¡(| |j ||dd¡¡Wdƒn1sN0Y| |j   ¡d¡dS©Núnot a regular filer) rBrÎÚassertRaisesRegexr ÚSendfileNotAvailableErrorr:rÚ_sock_sendfile_nativer]r/Útell©r$r"r;rŽr r rÚtest_sock_sendfile_not_a_fileÐs ÿÿ$zDProactorEventLoopUnixSockSendfileTests.test_sock_sendfile_not_a_filec Csp| ¡\}}t ¡}| tjd¡(| |j ||dd¡¡Wdƒn1sP0Y|  |j   ¡d¡dSrC) rBÚioÚBytesIOrEr rFr:rrGr]r/rHrIr r rÚtest_sock_sendfile_iobufferÙs ÿÿ$zBProactorEventLoopUnixSockSendfileTests.test_sock_sendfile_iobufferc Csx| ¡\}}t ¡}d|j_| tjd¡(| |j   ||dd¡¡Wdƒn1sX0Y|  |j   ¡d¡dS)NéÿÿÿÿrDr)rBrrr¹rfrEr rFr:rrGr]r/rHrIr r rÚ#test_sock_sendfile_not_regular_fileâs ÿÿ$zJProactorEventLoopUnixSockSendfileTests.test_sock_sendfile_not_regular_file)T)r±r²r³r(r rr$Ú classmethodr)r-rr8r:rBrJrMrOrµr r r%rr}s    rÚ__main__)Ú__doc__rKr!ZunittestÚsysrr Zasyncio.proactor_eventsrrrrrÚtestrZ test.supportr Ztest.test_asyncior rrrZTestCaserr¶rìZskipIfÚplatformrr±Úmainr r r rÚs<          >KX ÿn