Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_dictcomps.cpython-312.opt-2.pyc

�

'Μg1��|�ddlZddlZddlmZdZGd�dej
�Zedk(rej�yy)�N)�
BrokenIter�Global variablec�H�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)�DictComprehensionTestc�0�ddddddddd	d
d�
}td�D�cic]}||dz��
}}|j||�dd
ddddddddd�
}td�D��cic]}td�D]}||k(s�	||��
�}}}|j||�ycc}wcc}}w)N�
���
�������
r���������	rrrrrrrrrr��range�assertEqual)�self�expected�k�actual�vs     �0/usr/local/lib/python3.12/test/test_dictcomps.py�test_basicsz!DictComprehensionTest.test_basicss����b�R�B�2�"����b�"��%*�2�Y�/�Y��!�Q��V�)�Y��/������*��Q�1��q�Q�1��q�Q�O�� %�b�	�G�	�1�5��9�a��Q��!�Q�$�9�!�	��G������*��0��Hs�
B
�B�0Bc
�N�d}ddddddddddd�
}td�D�cic]}|d��}}|j||�|jd�idd�dd�dd�d	d
�dd
�dd
�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd �d!d �d"d �d#d �d$d �d%d �d&d �d'd(�d)d(�d*d(�d+d(�d,d(�d-d(��d(d(dddddddddd.��}td�D��cic]}t|dz|dz�D]}||���}}}|jd�|j||�ycc}wcc}}w)/NzLocal Variablerrrrrrr�r���$r�%�&�'�-r�.�/�0�1�6r�7�8�9�:�;�?r�@�A�B�C�D�E�Hr�I�J�K�L�M��N�O�Q�R�S�T�U�V�W�X�Yr)rr!r r"r#s     r$�test_scope_isolationz*DictComprehensionTest.test_scope_isolationsL�������$�4�D����$�8��#(��9�-�9�a�!�T�'�9��-������*�����,�-�7�A�q�7�"�a�7��Q�7��A�7�r�1�7�b�!�7�R��7�B��7���7��q�7�"$�a�7�)+�Q�7�02�A�7�79�1�7�>@�!�7�EG��7���7��q�7�"$�a�7�)+�Q�7�02�A�7�79�1�7�>@�!�7�EG��7���7��q�7�#%�a�7�*,�Q�7�13�A�7�8:�1�7�?A�!�7�FH��7���	7��q�	7�'(�Q�A�1�!���q�a�Q�A�7��!&�b�	�H�	�1�5��Q���B��3G�a�!�Q�$�3G�!�	��H�����,�-������*��.��Is�
D�!D!c
�Z�ddddddddddd�
}td�D�cic]}|d��}}|j||�|jtd�idd�dd�dd�d	d
�dd
�dd
�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�idd�dd�dd�dd�dd �d!d �d"d �d#d �d$d �d%d �d&d �d'd(�d)d(�d*d(�d+d(�d,d(�d-d(��d(d(dddddddddd.��}td�D��cic]}t|dz|dz�D]}||���}}}|jtd�|j||�ycc}wcc}}w)/Nrrrrrrrrr'rr(r)r*rr+r,r-r.rr/r0r1r2r3rr4r5r6r7r8r9rr:r;r<r=r>r?r@rrArBrCrDrErF)rr�g)rr rTr"r#s     r$� test_scope_isolation_from_globalz6DictComprehensionTest.test_scope_isolation_from_global)sG�����$�4�D����$�8��#(��9�-�9�a�!�T�'�9��-������*�����-�.�7�A�q�7�"�a�7��Q�7��A�7�r�1�7�b�!�7�R��7�B��7���7��q�7�"$�a�7�)+�Q�7�02�A�7�79�1�7�>@�!�7�EG��7���7��q�7�"$�a�7�)+�Q�7�02�A�7�79�1�7�>@�!�7�EG��7���7��q�7�#%�a�7�*,�Q�7�13�A�7�8:�1�7�?A�!�7�FH��7���	7��q�	7�'(�Q�A�1�!���q�a�Q�A�7��!&�b�	�H�	�1�5��Q���B��3G�a�!�Q�$�3G�!�	��H�����-�.������*��.��Is�
D"�!D'c��ddddddddddd�
}td�D�cic]	}|t��}}|j||�ycc}w)Nrrr)rrTr)rr r!r"s    r$�test_global_visibilityz,DictComprehensionTest.test_global_visibility:s[��(�->�(�->�(�->�(�->�(�->�	@��
!&�b�	�*�	�1�!�Q�$�	��*������*��+s�>c��d}ddddddddddd�
}td�D�cic]}||��}}|j||�|j|d�ycc}w)NzLocal variablerrr)rr#r r!r"s     r$�test_local_visibilityz+DictComprehensionTest.test_local_visibilityCsp����'�,<�'�,<�'�,<�'�,<�'�,<�	>��
!&�b�	�*�	�1�!�Q�$�	��*������*�����,�-��+s�
Ac���|jtd�5tddd�ddd�|jtd�5tddd�ddd�y#1swY�6xYw#1swYyxYw)Nz
cannot assignz'{x: y for y, x in ((1, 2), (3, 4))} = 5z<test>�execzillegal expressionz({x: y for y, x in ((1, 2), (3, 4))} += 5)�assertRaisesRegex�SyntaxError�compile)rs r$�test_illegal_assignmentz-DictComprehensionTest.test_illegal_assignmentNsh��
�
#�
#�K��
A��=�x��
�B��
#�
#�K�1E�
F��>���
�G�
F�	B�
A��G�
F�s�A�A&�A#�&A/c	����ddddd�}gd�}g��fd�}tdd	�D��cic]\}}|d
|�|d|���}}}|j||�|j�|�ycc}}w)N�W�o�l�d)�H�ercrb)
)�keyre)�valuera)rgrf)rhrb�rgrc)rh�rri)rhrc)rgrb)rhrdc�.���j||f�|S)N)�append)�posrh�actual_callss  �r$�add_callz=DictComprehensionTest.test_evaluation_order.<locals>.add_callis�������e��-��L��Hello�Worldrgrh)�zipr)rr �expected_callsror!r#r"rns       @r$�test_evaluation_orderz+DictComprehensionTest.test_evaluation_orderWs��������	
��
����	��G�W�-�
�-���1�
�U�A����!� 4�4�-�	�
�
	
�����*�����~�6��

s�A&c��ddddd�}td�D��cic]
}|dz}|||z��}}}|j||�dddd	d
�}td�D���cic]}|dz}|dz}||z||z��}}}}|j||�dddd	d
�}td�D���cic]}|dz|dz}}||z||z��}}}}|j||�ycc}}wcc}}}wcc}}}w)Nrrrr)rrrrrrr
�)rrrrr)rr �i�jr"r!s      r$�'test_assignment_idiom_in_comprehensionsz=DictComprehensionTest.test_assignment_idiom_in_comprehensionsus���Q�1��,��"'��(�:�(�Q�Q�q�S�q�!�Q�q�S�&�!�(��:������*��Q�2�"�-��$)�!�H�K�H�q�q��s��a��c��!�A�#�q��s�(�#�H��K������*��Q�2�"�-��$)�!�H�G�H�q�A�a�C��1��Q�!�!�A�#�q��s�(�#�H��G������*��;��L��Hs�C
�C�Cc���ddddd�}|jgtd��D�cic]}|||z��
c}|�|jgtd���D�cic]}|||z��
c}|�ycc}wcc}w)Nrrrr)rrrr)rr)rr rxs   r$�test_star_expressionz*DictComprehensionTest.test_star_expression�sv���Q�1��+�����+�E�!�H�+�6�+�Q�!�Q�q�S�&�+�6��A����,�E�!�H�,�7�,�Q�!�Q�q�S�&�,�7��B��7��7s�
A(�
A-c��d�}d�}d�}|df|df|dffD]�\}}|j|�5|�}tj|j�d}d}|j}	|j|j|	jd	z�|j|j|	jd	z�|j|j|j|z
|j|z
|�ddd���y#1swY��xYw)
Nc�v�	td��D�cic]}||��c}ycc}w#t$r}|cYd}~Sd}~wwxYw)NT)�init_raises�r�	Exception��xrfs  r$rzCDictComprehensionTest.test_exception_locations.<locals>.init_raises��<��
�(�T�:�;�:���1��:�;��;���
����
�� �#�
�#�#�	8�3�8�8c�v�	td��D�cic]}||��c}ycc}w#t$r}|cYd}~Sd}~wwxYw)NT)�next_raisesr�r�s  r$r�zCDictComprehensionTest.test_exception_locations.<locals>.next_raises�r�r�c�v�	td��D�cic]}||��c}ycc}w#t$r}|cYd}~Sd}~wwxYw)NT)�iter_raisesr�r�s  r$r�zCDictComprehensionTest.test_exception_locations.<locals>.iter_raises�r�r�zBrokenIter(init_raises=True)zBrokenIter(next_raises=True)zBrokenIter(iter_raises=True)rrr)�subTest�	traceback�
extract_tb�
__traceback__�__code__r�lineno�co_firstlineno�
end_lineno�line�colno�	end_colno)
rrr�r��funcr �exc�f�indent�cos
          r$�test_exception_locationsz.DictComprehensionTest.test_exception_locations�s���	�	�	�!,�-K�L� +�-K�L� +�-K�L� �N�D�(����d�#��f���(�(��):�):�;�A�>�����]�]��� � ����2�+<�+<�q�+@�A�� � ����r�/@�/@�1�/D�E�� � �������&�(8�1�;�;��;O�!P�!)�+�$�#�	 �$�#�s�CC:�:D	N)
�__name__�
__module__�__qualname__r%rRrUrWrYr_rurzr|r��rpr$rr
s5��+�+�&+�"+�	.��7�<	+�C�
!+rpr�__main__)	r��unittest�test.supportrrT�TestCaserr��mainr�rpr$�<module>r�sD����#���\+�H�-�-�\+�~�z���H�M�M�O�rp

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists