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 :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_dynamic.cpython-310.pyc
o

�9j*�@sJddlZddlZddlmZmZGdd�dej�Zedkr#e��dSdS)�N)�	swap_item�	swap_attrc@s`eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�RebindBuiltinsTestsz=Test all the ways that we can change/shadow globals/builtins.cG�dS)a�Perform TestCase-specific configuration on a function before testing.

        By default, this does nothing. Example usage: spinning a function so
        that a JIT will optimize it. Subclasses should override this as needed.

        Args:
            func: function to configure.
            *args: any arguments that should be passed to func, if calling it.

        Returns:
            Nothing. Work will be performed on func in-place.
        N�)�self�func�argsrr�(/usr/lib/python3.10/test/test_dynamic.py�configure_func
s
z"RebindBuiltinsTests.configure_funccCsfdd�}|�|�|�|�d�tt�ddd���|�|�d�Wd�dS1s,wYdS)NcS�tgd��S�N)�����lenrrrr
�foo�z=RebindBuiltinsTests.test_globals_shadow_builtins.<locals>.foorrcSr�N�r��xrrr
�<lambda>#�zBRebindBuiltinsTests.test_globals_shadow_builtins.<locals>.<lambda>r�r�assertEqualr�globals�rrrrr
�test_globals_shadow_builtinss
"�z0RebindBuiltinsTests.test_globals_shadow_builtinscCsddd�}|�|�|�|�d�ttddd���|�|�d�Wd�dS1s+wYdS)NcSrr
rrrrr
r(rz5RebindBuiltinsTests.test_modify_builtins.<locals>.foorrcSrrrrrrr
r-rz:RebindBuiltinsTests.test_modify_builtins.<locals>.<lambda>r)rrr�builtinsrrrr
�test_modify_builtins&s
"�z(RebindBuiltinsTests.test_modify_builtinscCsndd�}|�|�|�}|�t|�d�ttddd���|�t|�d�Wd�dS1s0wYdS)Ncs�"�td�}t|�Vt|�VdS�Nr��rangerrrrr
r2��
zLRebindBuiltinsTests.test_modify_builtins_while_generator_active.<locals>.foorrcSrrrrrrr
r:rzQRebindBuiltinsTests.test_modify_builtins_while_generator_active.<locals>.<lambda>r)rr�nextrr �rr�grrr
�+test_modify_builtins_while_generator_active0s
"�z?RebindBuiltinsTests.test_modify_builtins_while_generator_activecCsfttdt��#dd�}dd�}|�|dd��|�||�dd	g�Wd�dS1s,wYdS)
NrcSsdd�t_dS)NcSr)N�rrrrr
rBrzZRebindBuiltinsTests.test_modify_builtins_from_leaf_function.<locals>.bar.<locals>.<lambda>)r rrrrr
�barAszHRebindBuiltinsTests.test_modify_builtins_from_leaf_function.<locals>.barcSs2g}|�ttd���|�|�ttd���|Sr)�appendrr%)�modifier�lrrr
rDs
zHRebindBuiltinsTests.test_modify_builtins_from_leaf_function.<locals>.foocSsdS)Nrrrrr
rJrzMRebindBuiltinsTests.test_modify_builtins_from_leaf_function.<locals>.<lambda>rr+)rr rrr)rr,rrrr
�'test_modify_builtins_from_leaf_function=s"�z;RebindBuiltinsTests.test_modify_builtins_from_leaf_functioncCsZdd�}|�|�ddd�i}||dd�d�}|�td|�d	�|�tdd
|i�d	�dS)NcSrr
rrrrr
rOrzQRebindBuiltinsTests.test_cannot_change_globals_or_builtins_with_eval.<locals>.foorcSrrrrrrr
rTrzVRebindBuiltinsTests.test_cannot_change_globals_or_builtins_with_eval.<locals>.<lambda>cSr�N�rrrrr
rVr�r�__builtins__rzfoo()rr)rr�eval)rr�
builtins_dict�globals_dictrrr
�0test_cannot_change_globals_or_builtins_with_evalNs
�zDRebindBuiltinsTests.test_cannot_change_globals_or_builtins_with_evalcCsndd�}|�|�d|i}td|�|�|dd�ddd	�i}||d
d	�d�}td|�|�|dd�dS)NcSrr
rrrrr
r\rzQRebindBuiltinsTests.test_cannot_change_globals_or_builtins_with_exec.<locals>.foorz	x = foo()rrrcSrrrrrrr
rerzVRebindBuiltinsTests.test_cannot_change_globals_or_builtins_with_exec.<locals>.<lambda>cSrr1rrrrr
rgrr3)r�execr)rrr7r6rrr
�0test_cannot_change_globals_or_builtins_with_exec[s

�
zDRebindBuiltinsTests.test_cannot_change_globals_or_builtins_with_execcCstdd�}|�|�|�}|�t|�d�tt�dddd�i��|�t|�d�Wd�dS1s3wYdS)Ncsr"r#r$rrrr
rmr&zORebindBuiltinsTests.test_cannot_replace_builtins_dict_while_active.<locals>.foorr4rcSrrrrrrr
rurzTRebindBuiltinsTests.test_cannot_replace_builtins_dict_while_active.<locals>.<lambda>)rrr'rrr(rrr
�.test_cannot_replace_builtins_dict_while_activels
"�zBRebindBuiltinsTests.test_cannot_replace_builtins_dict_while_activecCsjdd�}|�|�|�|�d�tt�dddd�i��|�|�d�Wd�dS1s.wYdS)NcSrr
rrrrr
ryrzPRebindBuiltinsTests.test_cannot_replace_builtins_dict_between_calls.<locals>.foorr4rcSrrrrrrr
r~rzURebindBuiltinsTests.test_cannot_replace_builtins_dict_between_calls.<locals>.<lambda>rrrrr
�/test_cannot_replace_builtins_dict_between_callsxs
"�zCRebindBuiltinsTests.test_cannot_replace_builtins_dict_between_callscCs2ddd�i}td|�}|�|�|�|�d�dS)NrcSrrrrrrr
r�rzKRebindBuiltinsTests.test_eval_gives_lambda_custom_globals.<locals>.<lambda>zlambda: len([])r)r5rr)rr7rrrr
�%test_eval_gives_lambda_custom_globals�s

z9RebindBuiltinsTests.test_eval_gives_lambda_custom_globalsN)�__name__�
__module__�__qualname__�__doc__rrr!r*r0r8r:r;r<r=rrrr
r	s



	r�__main__)	r �unittest�test.supportrr�TestCaserr>�mainrrrr
�<module>s�

Youez - 2016 - github.com/yon3zu
LinuXploit