File "async_case.cpython-38.pyc"

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

U

if@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__8/opt/alt/python38/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._callCleanupcOsL|jdk	st|||}t|s&t|j}|j||f|j|Srr	AssertionErrorinspectZisawaitable
create_futurer

put_nowaitrun_until_completerrrrretfutrrrrJs

z"IsolatedAsyncioTestCase._callAsynccOsP|jdk	st|||}t|rH|j}|j||f|j|S|SdSrrr%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._asyncioLoopRunnercCsX|jdkstt}t||d||_|}||||_	|
|dS)NT)r	r r(Znew_event_loopset_event_loopZ	set_debugr"Zcreate_taskr.Z_asyncioCallsTaskr$)rloopr'rrr_setupAsyncioLoopos

z)IsolatedAsyncioTestCase._setupAsyncioLoopc	Cs|jdk	st|j}d|_|jd||jzt	|}|sNWvdS|D]}|
qR|tj||dd|D]0}|rq||
dk	r||d|
|dq|||W5td|XdS)NT)r0Zreturn_exceptionsz(unhandled exception during test shutdown)message	exceptiontask)r	r r
r#r$joinr(r/closeZ	all_tasksZcancelZgatherr*r3Zcall_exception_handlerZshutdown_asyncgens)rr0Z	to_cancelr4rrr_tearDownAsyncioLoopys4



z,IsolatedAsyncioTestCase._tearDownAsyncioLoopNcs(|zt|WS|XdSr)r1r7rrun)rresultrrrr8szIsolatedAsyncioTestCase.run)r)N)__name__
__module____qualname__rrrrrrrrrrr.r1r7r8
__classcell__rrrrrs

"r)r(r!Zcaserrrrrr<module>s