File "async_case.cpython-39.opt-1.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python39/lib64/python3.9/unittest/__pycache__/async_case.cpython-39.opt-1.pyc
File size: 4.48 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

a

XC?h@s0ddlZddlZddlmZGdddeZdS)N)TestCasecseZdZd#fdd	ZddZddZdd	Zd
dZdd
ZddZ	ddZ
ddZddZddZ
ddZddZd$fdd	Zfdd Zd!d"ZZS)%IsolatedAsyncioTestCaserunTestcst|d|_d|_dSN)super__init___asyncioTestLoop_asyncioCallsQueue)selfZ
methodName	__class__8/opt/alt/python39/lib64/python3.9/unittest/async_case.pyr!sz IsolatedAsyncioTestCase.__init__csdSrrrrrr
asyncSetUp&sz"IsolatedAsyncioTestCase.asyncSetUpcsdSrrrrrr
asyncTearDown)sz%IsolatedAsyncioTestCase.asyncTearDowncOs|j|g|Ri|dSr)Z
addCleanup)rfuncargskwargsrrraddAsyncCleanup,s
z'IsolatedAsyncioTestCase.addAsyncCleanupcCs|||jdSr)ZsetUp
_callAsyncrrrrr
_callSetUp;sz"IsolatedAsyncioTestCase._callSetUpcCs||dSr_callMaybeAsync)rmethodrrr_callTestMethod?sz'IsolatedAsyncioTestCase._callTestMethodcCs||j|dSr)rrZtearDownrrrr
_callTearDownBsz%IsolatedAsyncioTestCase._callTearDowncOs|j|g|Ri|dSrr)rZfunctionrrrrr_callCleanupFsz$IsolatedAsyncioTestCase._callCleanupcOs4||i|}|j}|j||f|j|Sr)r	
create_futurer

put_nowaitrun_until_completerrrrretfutrrrrIs
z"IsolatedAsyncioTestCase._callAsynccOsF||i|}t|r>|j}|j||f|j|S|SdSr)inspectZisawaitabler	rr
r r!r"rrrrQs

z'IsolatedAsyncioTestCase._callMaybeAsyncc
st|_}|d|IdH}||dur:dS|\}}z |IdH}|s`||WqttfyzYqt	tj
fy}z|s||WYd}~qd}~00qdSr)asyncioZQueuer
Z
set_resultgetZ	task_done	cancelled
SystemExitKeyboardInterrupt
BaseExceptionZCancelledErrorZ
set_exception)rr$ZqueueZqueryZ	awaitabler#Zexrrr_asyncioLoopRunner[s 

z*IsolatedAsyncioTestCase._asyncioLoopRunnercCsJt}t||d||_|}||||_|	|dS)NT)
r&Znew_event_loopset_event_loopZ	set_debugr	rZcreate_taskr,Z_asyncioCallsTaskr!)rloopr$rrr_setupAsyncioLoopns

z)IsolatedAsyncioTestCase._setupAsyncioLoopc
Cs|j}d|_|jd||jzt|}|s^W||td|	dS|D]}|
qb|tj|ddi|D]0}|rq|
dur|d|
|dq||W||td|	n"||td|	0dS)NZreturn_exceptionsTz(unhandled exception during test shutdown)message	exceptiontask)r	r
r r!joinr&Z	all_tasksZshutdown_default_executorr-closeZcancelZgatherr(r1Zcall_exception_handlerZshutdown_asyncgens)rr.Z	to_cancelr2rrr_tearDownAsyncioLoopxsB






z,IsolatedAsyncioTestCase._tearDownAsyncioLoopNcs.|zt|W|S|0dSr)r/rrunr5)rresultrrrr6szIsolatedAsyncioTestCase.runcs|t|dSr)r/rdebugr5rrrrr8s
zIsolatedAsyncioTestCase.debugcCs|jdur|dSr)r	r5rrrr__del__s
zIsolatedAsyncioTestCase.__del__)r)N)__name__
__module____qualname__rrrrrrrrrrr,r/r5r6r8r9
__classcell__rrrrrs 

$r)r&r%Zcaserrrrrr<module>s