Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/unittest/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/unittest/test/__pycache__/test_async_case.cpython-310.pyc
o

�9j}/�@s^ddlZddlZddlmZGdd�de�Zdd�ZGdd�dej�Ze	d	kr-e�
�dSdS)
�N)�supportc@seZdZdS)�MyExceptionN)�__name__�
__module__�__qualname__�rr�4/usr/lib/python3.10/unittest/test/test_async_case.pyrsrcCst�d�dS�N)�asyncio�set_event_loop_policyrrrr�tearDownModule
src@s`eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�
TestAsyncCaseNcCs|�tj�dSr	)�
addCleanupr�
gc_collect��selfrrr�setUpszTestAsyncCase.setUpcs�gd��G��fdd�dtj�}g�|d�}|��}|�|jg�|�|jg�|����g�|d�}|��|����|��|����dS)N)r�
asyncSetUp�test�
asyncTearDown�tearDown�cleanup6�cleanup5�cleanup4�cleanup3�cleanup2�cleanup1cs�eZdZ�fdd�Z��fdd�Z��fdd�Z��fdd�Z��fd	d
�Z��fdd�Z��fd
d�Z	��fdd�Z
��fdd�Z��fdd�Z��fdd�Z
dS)z+TestAsyncCase.test_full_cycle.<locals>.Testcs2|��g���d�|�|j�|�|j�dS)Nr)�assertEqual�appendr�on_cleanup1�addAsyncCleanup�on_cleanup2r��eventsrrr#s
z1TestAsyncCase.test_full_cycle.<locals>.Test.setUpc��<�|���dd����d�|�|j�|�|j�dS)N�r)rrr�on_cleanup3r �on_cleanup4r�r#�expectedrrr)�
�
z6TestAsyncCase.test_full_cycle.<locals>.Test.asyncSetUpc�r$)N�r)rrr�on_cleanup5r �on_cleanup6rr(rr�	test_func/r*z5TestAsyncCase.test_full_cycle.<locals>.Test.test_funcc��$�|���dd����d�dS)N�r�rrrr(rrr5��z9TestAsyncCase.test_full_cycle.<locals>.Test.asyncTearDownc�"|���dd����d�dS)N�rr1rr(rrr9�z4TestAsyncCase.test_full_cycle.<locals>.Test.tearDowncr3)N�
rr1rr(rrr=r5z7TestAsyncCase.test_full_cycle.<locals>.Test.on_cleanup1c�r/)N�	rr1rr(rrr!Ar2z7TestAsyncCase.test_full_cycle.<locals>.Test.on_cleanup2cr3)N�rr1rr(rrr&Er5z7TestAsyncCase.test_full_cycle.<locals>.Test.on_cleanup3c�r/)N�rr1rr(rrr'Ir2z7TestAsyncCase.test_full_cycle.<locals>.Test.on_cleanup4cr3)N�rr1rr(rrr,Mr5z7TestAsyncCase.test_full_cycle.<locals>.Test.on_cleanup5c�r/)N�rr1rr(rrr-Qr2z7TestAsyncCase.test_full_cycle.<locals>.Test.on_cleanup6N)rrrrrr.rrrr!r&r'r,r-rr(rr�Test"sr<r.)�unittest�IsolatedAsyncioTestCase�runr�errors�failures�debug�
doCleanups�rr<r�resultrr(r�test_full_cycles3zTestAsyncCase.test_full_cyclecs�G�fdd�dtj�}g�|d�}|��}|��ddg�|�|jdd|�|�d|jdd�g�|d�}|�|j�z|�	�Wn	t
yNYnw|�d	�|��dg�|��|��ddg�dS)
Nc�<eZdZ�fdd�Z�fdd�Z�fdd�Z�fdd�Zd	S)
z3TestAsyncCase.test_exception_in_setup.<locals>.Testc�����d�|�|j�t���Nr�rr �
on_cleanuprrr"rrre��
z>TestAsyncCase.test_exception_in_setup.<locals>.Test.asyncSetUpc�����d�dS�Nr�rrr"rrr.j��z=TestAsyncCase.test_exception_in_setup.<locals>.Test.test_funcc�rM�NrrOrr"rrrmrPzATestAsyncCase.test_exception_in_setup.<locals>.Test.asyncTearDownc�rM�N�cleanuprOrr"rrrKprPz>TestAsyncCase.test_exception_in_setup.<locals>.Test.on_cleanupN�rrrrr.rrKrr"rrr<ds
r<r.rrSrrr%� Expected a MyException exception�
r=r>r?r�assertIsr@�assertInr�_tearDownAsyncioLooprBr�failrCrDrr"r�test_exception_in_setupcs&�
z%TestAsyncCase.test_exception_in_setupcs�G�fdd�dtj�}g�|d�}|��}|��gd��|�|jdd|�|�d|jdd�g�|d�}|�|j�z|�	�Wn	t
yNYnw|�d�|��d	d
g�|��|��gd��dS)NcrG)
z2TestAsyncCase.test_exception_in_test.<locals>.Testc�rMrIrOrr"rrr�rPz=TestAsyncCase.test_exception_in_test.<locals>.Test.asyncSetUpc�rHrNrJrr"rrr.�rLz<TestAsyncCase.test_exception_in_test.<locals>.Test.test_funcc�rMrQrOrr"rrr�rPz@TestAsyncCase.test_exception_in_test.<locals>.Test.asyncTearDownc�rMrRrOrr"rrrK�rPz=TestAsyncCase.test_exception_in_test.<locals>.Test.on_cleanupNrTrr"rrr<�s
r<r.�rrrrSrrr%rUrr�rrrSrVrDrr"r�test_exception_in_test��&�
z$TestAsyncCase.test_exception_in_testcs�G�fdd�dtj�}g�|d�}|��}|��gd��|�|jdd|�|�d|jdd�g�|d�}|�|j�z|�	�Wn	t
yNYnw|�d�|��gd	��|��|��gd��dS)
NcrG)
z7TestAsyncCase.test_exception_in_tear_down.<locals>.Testc�rMrIrOrr"rrr�rPzBTestAsyncCase.test_exception_in_tear_down.<locals>.Test.asyncSetUpc�s���d�|�|j�dSrN)rr rKrr"rrr.�s�
zATestAsyncCase.test_exception_in_tear_down.<locals>.Test.test_funcc�����d�t��rQ�rrrr"rrr���
zETestAsyncCase.test_exception_in_tear_down.<locals>.Test.asyncTearDownc�rMrRrOrr"rrrK�rPzBTestAsyncCase.test_exception_in_tear_down.<locals>.Test.on_cleanupNrTrr"rrr<�s
r<r.r\rrr%rU)rrrrVrDrr"r�test_exception_in_tear_down�r_z)TestAsyncCase.test_exception_in_tear_downcs�G�fdd�dtj�}g�|d�}|��}|��gd��|�|jdd|�|�d|jdd�|�d|jdd�g�|d�}|�|j�z|�	�Wn	t
yYYnw|�d	�|��gd
��|��|��gd��dS)NcsHeZdZ�fdd�Z�fdd�Z�fdd�Z�fdd�Z�fd	d
�ZdS)z;TestAsyncCase.test_exception_in_tear_clean_up.<locals>.Testc�rMrIrOrr"rrr�rPzFTestAsyncCase.test_exception_in_tear_clean_up.<locals>.Test.asyncSetUpc�s(���d�|�|j�|�|j�dSrN)rr rr!rr"rrr.�s�
zETestAsyncCase.test_exception_in_tear_clean_up.<locals>.Test.test_funcc�rMrQrOrr"rrr�rPzITestAsyncCase.test_exception_in_tear_clean_up.<locals>.Test.asyncTearDownc�����d�td��)Nrz
some errorrarr"rrr���
zGTestAsyncCase.test_exception_in_tear_clean_up.<locals>.Test.on_cleanup1c�rd)Nrzother errorrarr"rrr!�rezGTestAsyncCase.test_exception_in_tear_clean_up.<locals>.Test.on_cleanup2N)rrrrr.rrr!rr"rrr<�sr<r.)rrrrrrzMyException: other errorr%zMyException: some errorrU)rrrrrVrDrr"r�test_exception_in_tear_clean_up�s(�
z-TestAsyncCase.test_exception_in_tear_clean_upcs>g�G�fdd�dtj�}|d�}|��|��gd��dS)Ncs,eZdZdd�Z�fdd�Z�fdd�ZdS)z:TestAsyncCase.test_cleanups_interleave_order.<locals>.Testc�s>�|�|jd�|�|jd�|�|jd�|�|jd�dS)Nr%r+r0r4)r �on_sync_cleanup�on_async_cleanuprrrrr.�s
�zDTestAsyncCase.test_cleanups_interleave_order.<locals>.Test.test_funcc�����d|���dS)Nz
sync_cleanup rO�r�valr"rrrg��zJTestAsyncCase.test_cleanups_interleave_order.<locals>.Test.on_sync_cleanupc�ri)Nzasync_cleanup rOrjr"rrrhrlzKTestAsyncCase.test_cleanups_interleave_order.<locals>.Test.on_async_cleanupN)rrrr.rgrhrr"rrr<�sr<r.)zasync_cleanup 4zsync_cleanup 3zasync_cleanup 2zsync_cleanup 1)r=r>r?r)rr<rrr"r�test_cleanups_interleave_order�s

z,TestAsyncCase.test_cleanups_interleave_ordercszg�G�fdd�dtj�}|d�}|��}|�|���|d�}|��|��ddg�|d�}|��}|�|���dS)Ncs,eZdZ�fdd�Z�fdd�Zdd�ZdS)zATestAsyncCase.test_base_exception_from_async_method.<locals>.Testc�r`)N�	test_base)r�
BaseExceptionrr"rrrnrbzKTestAsyncCase.test_base_exception_from_async_method.<locals>.Test.test_basec�rM)N�test_no_errrOrr"rrrprPzMTestAsyncCase.test_base_exception_from_async_method.<locals>.Test.test_no_errc�s
�t���r	)r
�CancelledErrorrrrr�test_cancels�zMTestAsyncCase.test_base_exception_from_async_method.<locals>.Test.test_cancelN)rrrrnrprrrr"rrr<sr<rnrprr)r=r>r?�assertFalse�
wasSuccessfulr�rr<r�outputrr"r�%test_base_exception_from_async_methodsz3TestAsyncCase.test_base_exception_from_async_methodcs8d�G�fdd�dtj�}|d�}|��}|���dS)NFcseZdZ�fdd�ZdS)z;TestAsyncCase.test_cancellation_hanging_tasks.<locals>.Testc�s��fdd�}t�|��dS)Nc�s0�zt�d�IdHWdStjyd��w)Nr%T)r
�sleeprqr��	cancelledrr�coro/s��z[TestAsyncCase.test_cancellation_hanging_tasks.<locals>.Test.test_leaking_task.<locals>.coro)r
�create_task)rr{ryrr�test_leaking_task.s�	zMTestAsyncCase.test_cancellation_hanging_tasks.<locals>.Test.test_leaking_taskN)rrrr}rryrrr<-sr<r})r=r>r?�
assertTruerurryr�test_cancellation_hanging_tasks+s

z-TestAsyncCase.test_cancellation_hanging_taskscs�G�fdd�dtj�}g�|d�}|��}|��gd��|�d|jdd�g�|d�}|�|j�z|��Wn	t	yCYnw|�
d�|��d	d
g�|��|��gd��dS)NcrG)
z8TestAsyncCase.test_debug_cleanup_same_loop.<locals>.Testc�s2�dd�}t�|��}|�|j|���d�dS)Nc�s�t�d�IdHdS)Nr)r
rxrrrrr{ArlzQTestAsyncCase.test_debug_cleanup_same_loop.<locals>.Test.asyncSetUp.<locals>.coror)r
�
ensure_futurer rSr)rr{�futr"rrr@s
�zCTestAsyncCase.test_debug_cleanup_same_loop.<locals>.Test.asyncSetUpc�r`rNrarr"rrr.GrbzBTestAsyncCase.test_debug_cleanup_same_loop.<locals>.Test.test_funcc�rMrQrOrr"rrrKrPzFTestAsyncCase.test_debug_cleanup_same_loop.<locals>.Test.asyncTearDownc�s>�zt�|g�IdH��d�WdSddl}|���)NrSr)r
�waitr�	traceback�	print_exc)rr�r�r"rrrSNs�z@TestAsyncCase.test_debug_cleanup_same_loop.<locals>.Test.cleanupN)rrrrr.rrSrr"rrr<?s
r<r.r\rrr%rUrrr])r=r>r?rrXr@rrYrBrrZrCrDrr"r�test_debug_cleanup_same_loop>s$�
z*TestAsyncCase.test_debug_cleanup_same_loop)rrr�maxDiffrrFr[r^rcrfrmrwrr�rrrrr
sM%$$*r
�__main__)r
r=rr�	Exceptionrr�TestCaser
r�mainrrrr�<module>s`�

Youez - 2016 - github.com/yon3zu
LinuXploit