[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.142.201.153: ~ $
U

��,a��@s0ddlZddlZddlmZGdd�de�ZdS)�N�)�TestCasecs�eZdZd�fdd�	Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd �fdd�	Z�ZS)!�IsolatedAsyncioTestCase�runTestcst��|�d|_d|_dS�N)�super�__init__�_asyncioTestLoop�_asyncioCallsQueue)�selfZ
methodName��	__class__��8/opt/alt/python38/lib64/python3.8/unittest/async_case.pyr"sz IsolatedAsyncioTestCase.__init__c�sdSrr�rrrr�
asyncSetUp'sz"IsolatedAsyncioTestCase.asyncSetUpc�sdSrrrrrr�
asyncTearDown*sz%IsolatedAsyncioTestCase.asyncTearDowncOs|j|f|�|�dSr)Z
addCleanup)r�func�args�kwargsrrr�addAsyncCleanup-s
z'IsolatedAsyncioTestCase.addAsyncCleanupcCs|��|�|j�dSr)ZsetUp�
_callAsyncrrrrr�
_callSetUp<sz"IsolatedAsyncioTestCase._callSetUpcCs|�|�dSr��_callMaybeAsync)r�methodrrr�_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�|�Sr�r	�AssertionError�inspectZisawaitable�
create_futurer
�
put_nowait�run_until_complete�rrrr�ret�futrrrrJs

z"IsolatedAsyncioTestCase._callAsynccOsP|jdk	st�|||�}t�|�rH|j��}|j�||f�|j�|�S|SdSrrr%rrrrRs


z'IsolatedAsyncioTestCase._callMaybeAsyncc
�s�t��|_}|�d�|��IdH}|��|dkr:dS|\}}z |IdH}|��s`|�|�Wqttfk
r|�Yqt	tj
fk
r�}z|��s�|�|�W5d}~XYqXqdSr)�asyncioZQueuer
Z
set_result�getZ	task_done�	cancelled�
SystemExit�KeyboardInterrupt�
BaseExceptionZCancelledErrorZ
set_exception)rr'ZqueueZqueryZ	awaitabler&Zexrrr�_asyncioLoopRunner\s 

z*IsolatedAsyncioTestCase._asyncioLoopRunnercCsX|jdkst�t��}t�|�|�d�||_|��}|�|�|��|_	|�
|�dS)NT)r	r r(Znew_event_loop�set_event_loopZ	set_debugr"Zcreate_taskr.Z_asyncioCallsTaskr$)r�loopr'rrr�_setupAsyncioLoopos

z)IsolatedAsyncioTestCase._setupAsyncioLoopc	Cs�|jdk	st�|j}d|_|j�d�|�|j���z�t�	|�}|sNW�vdS|D]}|�
�qR|�tj||dd���|D]0}|��r�q||�
�dk	r||�d|�
�|d��q||�|���W5t�d�|��XdS)NT)r0Zreturn_exceptionsz(unhandled exception during test shutdown)�message�	exception�task)r	r r
r#r$�joinr(r/�closeZ	all_tasksZcancelZgatherr*r3Zcall_exception_handlerZshutdown_asyncgens)rr0Z	to_cancelr4rrr�_tearDownAsyncioLoopys4

��

z,IsolatedAsyncioTestCase._tearDownAsyncioLoopNcs(|��zt��|�W�S|��XdSr)r1r7r�run)r�resultrrrr8�szIsolatedAsyncioTestCase.run)r)N)�__name__�
__module__�__qualname__rrrrrrrrrrr.r1r7r8�
__classcell__rrrrrs

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

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 3.07 KB 0644
__init__.cpython-38.opt-2.pyc File 1.35 KB 0644
__init__.cpython-38.pyc File 3.07 KB 0644
__main__.cpython-38.opt-1.pyc File 414 B 0644
__main__.cpython-38.opt-2.pyc File 381 B 0644
__main__.cpython-38.pyc File 414 B 0644
async_case.cpython-38.opt-1.pyc File 4.02 KB 0644
async_case.cpython-38.opt-2.pyc File 4.02 KB 0644
async_case.cpython-38.pyc File 4.1 KB 0644
case.cpython-38.opt-1.pyc File 49.26 KB 0644
case.cpython-38.opt-2.pyc File 34.47 KB 0644
case.cpython-38.pyc File 49.32 KB 0644
loader.cpython-38.opt-1.pyc File 14.11 KB 0644
loader.cpython-38.opt-2.pyc File 11.48 KB 0644
loader.cpython-38.pyc File 14.21 KB 0644
main.cpython-38.opt-1.pyc File 7.37 KB 0644
main.cpython-38.opt-2.pyc File 7.2 KB 0644
main.cpython-38.pyc File 7.37 KB 0644
mock.cpython-38.opt-1.pyc File 75.57 KB 0644
mock.cpython-38.opt-2.pyc File 56.88 KB 0644
mock.cpython-38.pyc File 75.57 KB 0644
result.cpython-38.opt-1.pyc File 7.13 KB 0644
result.cpython-38.opt-2.pyc File 5.59 KB 0644
result.cpython-38.pyc File 7.13 KB 0644
runner.cpython-38.opt-1.pyc File 6.87 KB 0644
runner.cpython-38.opt-2.pyc File 6.27 KB 0644
runner.cpython-38.pyc File 6.87 KB 0644
signals.cpython-38.opt-1.pyc File 2.18 KB 0644
signals.cpython-38.opt-2.pyc File 2.18 KB 0644
signals.cpython-38.pyc File 2.18 KB 0644
suite.cpython-38.opt-1.pyc File 9.72 KB 0644
suite.cpython-38.opt-2.pyc File 8.72 KB 0644
suite.cpython-38.pyc File 9.72 KB 0644
util.cpython-38.opt-1.pyc File 4.27 KB 0644
util.cpython-38.opt-2.pyc File 3.57 KB 0644
util.cpython-38.pyc File 4.34 KB 0644