Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/test/__pycache__/test_global.cpython-34.pyo

�
f f�@sydZddlmZmZmZddlZddlZGdd�dej�Zdd�Z	e
dkrue	�ndS)	zDVerify that warnings are issued for global statements following use.�)�run_unittest�check_syntax_error�check_warningsNc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�GlobalTestscCs0t�|_|jj�tjddd�dS)N�error�modulez
<test string>)r�_warnings_manager�	__enter__�warnings�filterwarnings)�self�r
�5/opt/alt/python34/lib64/python3.4/test/test_global.py�setUp
s
zGlobalTests.setUpcCs|jjddd�dS)N)r�__exit__)rr
r
r�tearDownszGlobalTests.tearDowncCsd}t||�dS)Nz<def wrong1():
    a = 1
    b = 2
    global a
    global b
)r)rZprog_text_1r
r
r�test1szGlobalTests.test1cCsd}t||�dS)Nz(def wrong2():
    print(x)
    global x
)r)rZprog_text_2r
r
r�test2szGlobalTests.test2cCsd}t||�dS)Nz2def wrong3():
    print(x)
    x = 2
    global x
)r)rZprog_text_3r
r
r�test3%szGlobalTests.test3cCsd}t|dd�dS)Nzglobal x
x = 2
z
<test string>�exec)�compile)rZprog_text_4r
r
r�test4.szGlobalTests.test4N)	�__name__�
__module__�__qualname__rrrrrrr
r
r
rrs
	rcCs4tj��"tjddd�tt�WdQXdS)Nrrz
<test string>)r
�catch_warningsrrrr
r
r
r�	test_main7s
r�__main__)�__doc__Ztest.supportrrrZunittestr
ZTestCaserrrr
r
r
r�<module>s/