Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_global.cpython-311.pyc
�

�Ke����dZddlmZddlmZddlZddlZGd�dej��Zd�Z	e
dkrej��dSdS)	zDVerify that warnings are issued for global statements following use.���check_syntax_error)�check_warningsNc�,�eZdZd�Zd�Zd�Zd�Zd�ZdS)�GlobalTestsc�t�|�t����tjdd���dS�N�error�
<test string>)�module)�enterContextr�warnings�filterwarnings)�selfs �:/usr/local/apps/python3/lib/python3.11/test/test_global.py�setUpzGlobalTests.setUps8�����.�*�*�+�+�+�����@�@�@�@�@�@�c�0�d}t||dd���dS)Nz<def wrong1():
    a = 1
    b = 2
    global a
    global b
����lineno�offsetr)r�prog_text_1s  r�test1zGlobalTests.test1s(����	�4��Q�q�A�A�A�A�A�Arc�0�d}t||dd���dS)Nz(def wrong2():
    print(x)
    global x
�rrr)r�prog_text_2s  r�test2zGlobalTests.test2s(����
	�4��Q�q�A�A�A�A�A�Arc�0�d}t||dd���dS)Nz2def wrong3():
    print(x)
    x = 2
    global x
rrrr)r�prog_text_3s  r�test3zGlobalTests.test3!s(����	�4��Q�q�A�A�A�A�A�Arc�,�d}t|dd��dS)Nzglobal x
x = 2
r�exec)�compile)r�prog_text_4s  r�test4zGlobalTests.test4*s#����
	��_�f�5�5�5�5�5rN)�__name__�
__module__�__qualname__rrrr"r'�rrrr	sk������A�A�A�B�B�B�B�B�B�B�B�B�6�6�6�6�6rrc�|�tjtj����tjdd���dSr	)�unittest�enterModuleContextr�catch_warningsrr+rr�setUpModuler03s8����� 7� 9� 9�:�:�:���G�O�<�<�<�<�<�<r�__main__)�__doc__�test.supportr�test.support.warnings_helperrr-r�TestCaserr0r(�mainr+rr�<module>r7s���J�J�+�+�+�+�+�+�7�7�7�7�7�7���������'6�'6�'6�'6�'6�(�#�'6�'6�'6�T=�=�=�
�z����H�M�O�O�O�O�O��r