/opt/alt/python34/lib64/python3.4/asyncio/__pycache__
NameSizeModeActions
base_events.cpython-34.pyc381670644editdlrm
base_events.cpython-34.pyo378350644editdlrm
base_subprocess.cpython-34.pyc98210644editdlrm
base_subprocess.cpython-34.pyo96960644editdlrm
compat.cpython-34.pyc7510644editdlrm
compat.cpython-34.pyo7510644editdlrm
constants.cpython-34.pyc2420644editdlrm
constants.cpython-34.pyo2420644editdlrm
coroutines.cpython-34.pyc87020644editdlrm
coroutines.cpython-34.pyo85690644editdlrm
events.cpython-34.pyc241880644editdlrm
events.cpython-34.pyo239790644editdlrm
futures.cpython-34.pyc156600644editdlrm
futures.cpython-34.pyo153860644editdlrm
locks.cpython-34.pyc156970644editdlrm
locks.cpython-34.pyo156970644editdlrm
log.cpython-34.pyc2440644editdlrm
log.cpython-34.pyo2440644editdlrm
proactor_events.cpython-34.pyc180090644editdlrm
proactor_events.cpython-34.pyo177630644editdlrm
protocols.cpython-34.pyc60910644editdlrm
protocols.cpython-34.pyo60910644editdlrm
queues.cpython-34.pyc89310644editdlrm
queues.cpython-34.pyo89310644editdlrm
selector_events.cpython-34.pyc309980644editdlrm
selector_events.cpython-34.pyo309330644editdlrm
sslproto.cpython-34.pyc213040644editdlrm
sslproto.cpython-34.pyo210530644editdlrm
streams.cpython-34.pyc208450644editdlrm
streams.cpython-34.pyo204880644editdlrm
subprocess.cpython-34.pyc71520644editdlrm
subprocess.cpython-34.pyo71160644editdlrm
tasks.cpython-34.pyc228510644editdlrm
tasks.cpython-34.pyo226470644editdlrm
test_utils.cpython-34.pyc163380644editdlrm
test_utils.cpython-34.pyo159310644editdlrm
transports.cpython-34.pyc121630644editdlrm
transports.cpython-34.pyo121270644editdlrm
unix_events.cpython-34.pyc313780644editdlrm
unix_events.cpython-34.pyo309670644editdlrm
windows_events.cpython-34.pyc233080644editdlrm
windows_events.cpython-34.pyo233080644editdlrm
windows_utils.cpython-34.pyc59430644editdlrm
windows_utils.cpython-34.pyo58410644editdlrm
__init__.cpython-34.pyc8700644editdlrm
__init__.cpython-34.pyo8700644editdlrm
Edit: /opt/alt/python34/lib64/python3.4/asyncio/__pycache__/test_utils.cpython-34.pyo (15931B)
f2@sdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddl mZddlmZddlmZmZyddlZWnek rdZYnXddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlm Z e j!dkrddl"m#Z#nddlm#Z#ddZ$ddZ%dddZ&ddZ'GdddeZ(GdddeZ)GdddZ*Gd d!d!e*e)Z+d"d#d$d%Z,e-ed&rGd'd(d(ej.eZ/Gd)d*d*e/eZ0Gd+d,d,e0Z1Gd-d.d.e*e1Z2d/d0Z3ej4d1d2Z5ej4d"d#d3d4Z6nej4d5d6d7dd"d#d8d9Z7d:d;Z8Gd<d=d=ej9Z:Gd>d?d?ej;Z<d@dAZ=GdBdCdCe>Z?dDdEZ@GdFdGdGe jAZAej4dHdIZBejCejDejEdJdKZFdLdMZGdS)NzUtilities shared by tests.N)mock) HTTPServer)WSGIRequestHandler WSGIServer) base_events)compat)events)futures) selectors)tasks) coroutine)loggerwin32) socketpaircCs$tdkrdStjtjSdS)N)sslZ SSLContextZPROTOCOL_SSLv23rr7/opt/alt/python34/lib64/python3.4/asyncio/test_utils.pydummy_ssl_context*s rc CsVtdd}|}|j|}d|_z|j|Wd|jXdS)NcSsdS)Nrrrrronce2szrun_briefly..onceF)r Z create_taskZ_log_destroy_pendingrun_until_completeclose)looprgentrrr run_briefly1s  rcCsztj|}xc|su|dk rV|tj}|dkrVtjqVn|jtjdd|qWdS)NrgMbP?r)timer TimeoutErrorrr Zsleep)rZpredtimeoutZdeadlinerrr run_until@s   r cCs|j|j|jdS)zLegacy API to run once through the event loop. This is the recommended pattern for test code. It will poll the selector once and run all callbacks scheduled in response to I/O events. N)Z call_soonstopZ run_forever)rrrrrun_onceJsr"c@s(eZdZddZddZdS)SilentWSGIRequestHandlercCs tjS)N)ioStringIO)selfrrr get_stderrWsz#SilentWSGIRequestHandler.get_stderrcGsdS)Nr)r&formatargsrrr log_messageZsz$SilentWSGIRequestHandler.log_messageN)__name__ __module__ __qualname__r'r*rrrrr#Us  r#cs4eZdZdZfddZddZS)SilentWSGIServercs/tj\}}|j|j||fS)N)super get_request settimeoutrequest_timeout)r&request client_addr) __class__rrr1bszSilentWSGIServer.get_requestcCsdS)Nr)r&r4client_addressrrr handle_errorgszSilentWSGIServer.handle_error)r+r,r-r3r1r8rr)r6rr.^s r.c@seZdZddZdS)SSLWSGIServerMixinc Cstjjtjjtdd}tjj|s`tjjtjjtjdd}ntjj|d}tjj|d}tj|d|d|d d }y!|j||||j Wnt k rYnXdS) Nz..ZtestsZtestZ test_asyncioz ssl_key.pemz ssl_cert.pemkeyfilecertfileZ server_sideT) ospathjoindirname__file__isdirrZ wrap_socketZRequestHandlerClassrOSError)r&r4r7herer:r;Zssockrrrfinish_requestms$   z!SSLWSGIServerMixin.finish_requestN)r+r,r-rDrrrrr9ks r9c@seZdZdS) SSLWSGIServerN)r+r,r-rrrrrEs rEuse_sslFc #sdd}|r|n|}||tj|j_tjdfdd}|jz VWdjj|j XdS)NcSs#d}dg}|||dgS)Nz200 OK Content-type text/plains Test message)rGrHr)environZstart_responseZstatusZheadersrrrapps  z_run_test_server..apptargetcsjddS)NZ poll_intervalg?)Z serve_foreverr)httpdrrsz"_run_test_server..) r#Zset_appZserver_addressaddress threadingZThreadstartZshutdownZ server_closer>)rNrF server_clsserver_ssl_clsrJZ server_classZ server_threadr)rLr_run_test_servers        rSZAF_UNIXc@seZdZddZdS)UnixHTTPServercCs&tjj|d|_d|_dS)Nz 127.0.0.1P) socketserverUnixStreamServer server_bindZ server_nameZ server_port)r&rrrrXs zUnixHTTPServer.server_bindN)r+r,r-rXrrrrrTs rTcs4eZdZdZddZfddZS)UnixWSGIServerr/cCstj||jdS)N)rTrXZ setup_environ)r&rrrrXs zUnixWSGIServer.server_bindcs/tj\}}|j|j|dfS)N 127.0.0.1)rZr[)r0r1r2r3)r&r4r5)r6rrr1szUnixWSGIServer.get_request)r+r,r-r3rXr1rr)r6rrYs  rYc@seZdZddZdS)SilentUnixWSGIServercCsdS)Nr)r&r4r7rrrr8sz!SilentUnixWSGIServer.handle_errorN)r+r,r-r8rrrrr\s r\c@seZdZdS)UnixSSLWSGIServerN)r+r,r-rrrrr]s r]cCs tj}|jSWdQXdS)N)tempfileZNamedTemporaryFilename)filerrrgen_unix_socket_pathsraccs@t}z |VWdytj|Wntk r:YnXXdS)N)rar<unlinkrB)r=rrrunix_socket_paths   rcccs:t+}td|d|dtdtDdHWdQXdS)NrNrFrQrR)rcrSr\r])rFr=rrrrun_test_unix_servers rdhostz 127.0.0.1portc cs.td||fd|dtdtDdHdS)NrNrFrQrR)rSr.rE)rerfrFrrrrun_test_serversrgcCsqi}xKt|D]=}|jdr=|jdr=qntdd||.genFTrg& .>) r0rt_check_on_close_gennext_timeZ_clock_resolution_timersrrZ _selectorreaderswritersreset_counters)r&r)r6rrrts             zTestLoop.__init__cCs|jS)N)r)r&rrrr/sz TestLoop.timecCs|r|j|7_ndS)zMove test time forward.N)r)r&advancerrr advance_time2szTestLoop.advance_timec sRtj|jrNy|jjdWntk r>YqNXtdndS)NrzTime generator is not finished)r0rr~rsend StopIterationAssertionError)r&)r6rrr7s   zTestLoop.closecGs tj||||j|.EmptyCMcSsdS)Nr)r&rrr __enter__sz+TestCase.subTest..EmptyCM.__enter__cWsdS)Nr)r&excrrr__exit__sz*TestCase.subTest..EmptyCM.__exit__N)r+r,r-rrrrrrEmptyCMs  rr)r&r)rrrrrsubTestszTestCase.subTest) r+r,r-rrrrZPY34rrrrrrs   rc cs;tj}ztjtjddVWdtj|XdS)zrContext manager to disable asyncio logger. For example, it can be used to ignore warnings in debug mode. rN)rlevelZsetLevelloggingZCRITICAL)Z old_levelrrrdisable_loggers   rcCs=tjtj}||_||_||_d|j_|S)z'Create a mock of a non-blocking socket.g)rZ MagicMocksocketprotornfamilyZ gettimeoutri)rrnrZsockrrrmock_nonblocking_sockets     rcCstjdddS)Nz'asyncio.sslproto._is_sslproto_availableriF)rZpatchrrrrforce_legacy_ssl_supports r)Hrr contextlibr$rr<rrrVrr^rOrZunittestrZ http.serverrZwsgiref.simple_serverrrr ImportErrorr[rrr r r r Z coroutinesr logrplatformZ windows_utilsrrrr r"r#r.r9rErShasattrrWrTrYr\r]racontextmanagerrcrdrgrqZ BaseSelectorrrZ BaseEventLoopr}rmrrrrrZ IPPROTO_TCPZ SOCK_STREAMZAF_INETrrrrrrs|                        v