Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.21.40.24
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_global.cpython-310.pyc
o

`b��@s^dZddlmZddlmZddlZddlZGdd�dej�Zdd�Z	e
d	kr-e��dSdS)
zDVerify that warnings are issued for global statements following use.���check_syntax_error)�check_warningsNc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�GlobalTestscCs$t�|_|j��tjddd�dS�N�error�
<test string>)�module)r�_warnings_manager�	__enter__�warnings�filterwarnings��self�r�9/usr/local/python-3.10/lib/python3.10/test/test_global.py�setUps
zGlobalTests.setUpcCs|j�ddd�dS)N)r
�__exit__rrrr�tearDownszGlobalTests.tearDowncC�d}t||ddd�dS)Nz<def wrong1():
    a = 1
    b = 2
    global a
    global b
����lineno�offsetr)rZprog_text_1rrr�test1szGlobalTests.test1cCr)Nz(def wrong2():
    print(x)
    global x
�rrr)rZprog_text_2rrr�test2szGlobalTests.test2cCr)Nz2def wrong3():
    print(x)
    x = 2
    global x
rrrr)rZprog_text_3rrr�test3&szGlobalTests.test3cCsd}t|dd�dS)Nzglobal x
x = 2
r�exec)�compile)rZprog_text_4rrr�test4/szGlobalTests.test4N)	�__name__�
__module__�__qualname__rrrrrr!rrrrr	s
	rcCs4t��}|��t�|jddd�tjddd�dSr)r�catch_warningsr�unittestZaddModuleCleanuprr
)�cmrrr�setUpModule8sr(�__main__)�__doc__Ztest.supportrZtest.support.warnings_helperrr&rZTestCaserr(r"�mainrrrr�<module>s/�
© 2025 GrazzMean