python (3.11.7)
    e                         d dl Z d dlZd dlZd dlmZmZ  G d dej                  Z G d dej                  Ze	dk    r ej
                     dS dS )    N)	swap_item	swap_attrc                   T    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Z
d Zd
S )RebindBuiltinsTestsz=Test all the ways that we can change/shadow globals/builtins.c                     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 )selffuncargss      E/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_dynamic.pyconfigure_funcz"RebindBuiltinsTests.configure_func   s	     	
    c                    d }|                      |           |                      |            d           t          t                      dd           5  |                      |            d           d d d            d S # 1 swxY w Y   d S )Nc                  $    t          g d          S N)         lenr   r   r   fooz=RebindBuiltinsTests.test_globals_shadow_builtins.<locals>.foo       yyy>>!r   r   r   c                     dS N   r   xs    r   <lambda>zBRebindBuiltinsTests.test_globals_shadow_builtins.<locals>.<lambda>$   s    1 r   r   r
   assertEqualr   globalsr	   r   s     r   test_globals_shadow_builtinsz0RebindBuiltinsTests.test_globals_shadow_builtins   s    	"