python (3.12.0)
͑e d dl Z d dlZd dlZd dlmZmZ G d dej Z G d dej Ze dk( r ej yy) N) swap_item swap_attrc R e Zd ZdZd Zd Zd Zd Zd Zd Z d Z
d Zd
Zd Z
d Zy
)RebindBuiltinsTestsz=Test all the ways that we can change/shadow globals/builtins.c y)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.12.0/bootstrap/lib/python3.12/test/test_dynamic.pyconfigure_funcz"RebindBuiltinsTests.configure_func s
c d }| j | | j | d t t dd 5 | j | d d d d y # 1 sw Y y xY w)Nc t g d S N) lenr r r fooz=RebindBuiltinsTests.test_globals_shadow_builtins.<locals>.foo y>!r r r c yN r xs r <lambda>zBRebindBuiltinsTests.test_globals_shadow_builtins.<locals>.<lambda>$ r r r
assertEqualr globalsr r s r test_globals_shadow_builtinsz0RebindBuiltinsTests.test_globals_shadow_builtins s\ "C "
wy%
5 'SUA& '