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

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

U

e5d@s0ddlZddlZddlmZGdddeZdS)N)TestCasecseZdZdfdd	ZddZddZdd	Zd
dZdd
ZddZ	ddZ
ddZddZddZ
ddZddZd fdd	ZZS)!IsolatedAsyncioTestCaserunTestcst|d|_d|_dSN)super__init___asyncioTestLoop_asyncioCallsQueue)selfZ
methodName	__class__+/usr/lib64/python3.8/unittest/async_case.pyr"sz IsolatedAsyncioTestCase.__init__csdSrrrrrr
asyncSetUp'sz"IsolatedAsyncioTestCase.asyncSetUpcsdSrrrrrr
asyncTearDown*sz%IsolatedAsyncioTestCase.asyncTearDowncOs|j|f||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
_callTearDownCsz%IsolatedAsyncioTestCase._callTearDowncOs|j|f||dSrr)rZfunctionrrrrr_callCleanupGsz$IsolatedAsyncioTestCase._callCleanupcOs0|||}|j}|j||f|j|Sr)r	
create_futurer

put_nowaitrun_until_completerrrrretfutrrrrJs

z"IsolatedAsyncioTestCase._callAsynccOsB|||}t|r:|j}|j||f|j|S|SdSr)inspectZisawaitabler	rr
r r!r"rrrrRs


z'IsolatedAsyncioTestCase._callMaybeAsyncc
st|_}|d|IdH}||dkr:dS|\}}z |IdH}|s`||Wqttfk
r|Yqt	tj
fk
r}z|s||W5d}~XYqXqdSr)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_setupAsyncioLoopos

z)IsolatedAsyncioTestCase._setupAsyncioLoopc	Cs|j}d|_|jd||jzt|}|s@WvdS|D]}|	qD|tj
||dd|D]0}|r|qn|dk	rn|
d||dqn||W5td|XdS)NT)r.Zreturn_exceptionsz(unhandled exception during test shutdown)message	exceptiontask)r	r
r r!joinr&r-closeZ	all_tasksZcancelZgatherr(r1Zcall_exception_handlerZshutdown_asyncgens)rr.Z	to_cancelr2rrr_tearDownAsyncioLoopys2



z,IsolatedAsyncioTestCase._tearDownAsyncioLoopNcs(|zt|WS|XdSr)r/r5rrun)rresultrrrr6szIsolatedAsyncioTestCase.run)r)N)__name__
__module____qualname__rrrrrrrrrrr,r/r5r6
__classcell__rrrrrs

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