HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/__pycache__/test_struct.cpython-312.opt-1.pyc
�

~h�eϙ��2�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ddlmZej dk(ZdZdZefd	�Zd
�Zd�ZGd�d
ej.�ZGd�dej.�Zedk(rej6�yy)�)�abcN)�support)�
import_helper)�assert_python_ok�big)�b�B�h�H�i�I�l�L�q�Q�n�N)��@�=�<�>�!c#�NK�tD]}|D]}|dvr|dvr�||f����y�w)N�rr)rr)�
integer_codes)�
byteorders�code�	byteorders   �7/opt/alt/python312/lib64/python3.12/test/test_struct.py�iter_integer_formatsr!s@�����"��#�	"�I���*�t�z�/A���	�/�!�	"�"�s�#%c��|ddd�S)N����)�ss r �string_reverser&s���T�r�T�7�N�c�(�tr|St|�S�N)�ISBIGENDIANr&)�values r �bigendian_to_nativer,s������e�$�$r'c�D�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zej.d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zej.d��Z d�Z!ej.d��Z"ej.d��Z#d �Z$y!)"�
StructTestc�d�|jtjdd�ddk(t�y)Nz=i�r)�assertEqual�struct�packr*��selfs r �test_isbigendianzStructTest.test_isbigendian%s'�����&�+�+�d�A�.�q�1�Q�6��Er'c�L�|jtjtjd�tjd�}|j	|dztjd��d}d}tj|�}tj|�}|j	|dz|�|jtjtj
dd�|jtjtj
dddd�|jttjftj
dd�|jttjftj
dd�|jtjtjd	d
�tj
ddd
�}|jtjtjd|�|jtjtjd|�y)N�Zr��iiizcbxxxxxxhhhhiillffd?z3c3b18x12h6i6l6f3d3?�foo�P�dsflap�iir0�)�assertRaisesr2�error�calcsizer1r3�	TypeError�unpack)r5�sz�fmt�fmt3�sz3r%s      r �test_consistencezStructTest.test_consistence(se�����&�,�,�����=�
�_�_�S�
!������a������!7�8�$��%��
�_�_�S�
!���o�o�d�#������a���%����&�,�,����U�A�>����&�,�,����S�!�Q��B����9�f�l�l�3�V�[�[�#�u�M����9�f�l�l�3�V�[�[�#�u�M����&�,�,��
�
�s�G�D��K�K��a��#�����&�,�,��
�
�u�a�@����&�,�,��
�
�s�A�>r'c
�J�d}d}d}d}d}d}d}d}dD�]
}	d	D�]}
|	|
z}
tj|
||||||||�	}tj|
|�\}}
}}}}}}|j||�|j|
|�|j||�|j||�|j||�|jt	d
|z�t	d
|z��|jt	d
|z�t	d
|z��|j||�����y)N�ar0�i��igo���!	@T)rrrrrr)z	xcbhilfd?z	xcBHILfd?�d)r2r3rDr1�int)r5�crr
rr�fr=�t�prefix�formatr%�cp�bp�hp�ip�lp�fp�dp�tps                    r �test_transitivenesszStructTest.test_transitiveness=s0����
��������������3�	(�F�4�
(���&����K�K���1�a��A�q�!�Q�?��17���v�q�1I�.��B��B��B��B�� � ��Q�'�� � ��Q�'�� � ��Q�'�� � ��Q�'�� � ��Q�'�� � ��S�2�X���C�!�G��=�� � ��S�2�X���C�!�G��=�� � ��Q�'�
(�	(r'c� �gd�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�d�d�d�d�d �d!�d"gd#d#d$f�d%�}|D]�\}}}}}d&|z|fd'|z|fd(|z|fd)|ztxr|xs|ffD]�\}}tj||�}	|j|	|�|jtj|�t|	��tj||	�d*}
|
|k7s�{|j|�����y)+N)rOrKrKrKr)�xcrK�ar_r)�cxrK�arar)r%rKrKrKr)�0s�
helloworldr'r'r0)�1src�hrer0)�9src�	helloworlrgr0)�10srcrcrcr)�11src�helloworldrjr0)�20src�helloworldrlr0)r��rnr)ri������ror)r	rmrnrnr)r	�roror)r
�����r)r
iD�����D�D�r)rrqrrrsr)riD�rtrur)r�,�,���,r)r�����������r)r
rvrwrxr)r
��b�wrzr{r)rrvrwrxr)rryrzr{r)rrvrwrxr)rr|rzr{r)rP�@s@s@r)r=r}s@s@r)rP��s�s�r)r=r~s�s�r)�?r�r�r)rr9�r�r0)rTr�r�rrr�r0)r)r0r�r�r0rrrrr)r*r2r3r1rB�lenrD�
assertTrue)r5�testsrF�argr�lil�asy�xfmt�exp�res�revs           r �test_new_featureszStructTest.test_new_featuresUsS��&
�&�&
�+�&
�
,�&
�
'�	&
�

/�&
�
1�
&
�
A�&
�
D�&
�
H�&
�
V�&
�
&�&
�
+�&
�
&�&
�
,�&
�
4�&
� 
/�!&
�"
4�#&
�$
6�%&
�&
C�'&
�(
J�)&
�*
C�+&
�,
U�-&
�.
C�/&
�0
J�1&
�2
C�3&
�4
U�5&
�6
>�7&
�8
<�9&
�<
E�=&
�>
@�?&
�B
&�C&
�D
&�E&
�F
)�G&
�H�"�e�U�A�&�I&
�J
)�K&
��P(-�	)�#�C��c�3��!$�S��#���S��#���S��#��!$�S��+�*=�#�*D�� E� G�
)���s��k�k�$��,��� � ��c�*�� � �����!6��C��A��m�m�D�#�.�q�1���#�:��O�O�C�(�
)�	)r'c��ddddddddddd�
}td�D]4\}}||z}tj|�}|j|||��6d}|D]Q}dD]J}tj||d	z�}tj||dz�}	|j||	��L�S|jtjd
�d�|j	dtjd��|j	dtjd��|j	tjd�tjd
��|j	tjd
�tjd��|j	dtjd��|j	tjd�tjd��|jtjd�tjd
��|jtjd�tjd��y)Nr0r?��)
rr	r
rrr
rrrr�rrrr)�bB�hH�iI�lL�nN�qQrrrr
rrrrr<)r!r2rBr1�assertLessEqual�assertGreaterEqual)
r5�
expected_sizerrrS�size�native_pairs�format_pair�signed_size�
unsigned_sizes
          r �
test_calcsizezStructTest.test_calcsize�s��������������
� 4�4H�I�	8�O�D�)��t�^�F��?�?�6�*�D����T�=��#6�7�	8�:��'�	=�K�$�
=�	�$�o�o�i�+�a�.�.H�I�� &���	�K��N�0J� K�
�� � ��m�<�
=�	=�	
�������-�q�1����Q����� 4�5����Q����� 4�5����V�_�_�S�1�6�?�?�3�3G�H����V�_�_�S�1�6�?�?�3�3G�H����Q����� 4�5����V�_�_�S�1�6�?�?�3�3G�H�������� 4�f�o�o�c�6J�K�������� 4�f�o�o�c�6J�Kr'c�����ddl�G���fd�dtj��t�D]"\}}||z����}|j	��$y)Nrc�x���eZdZ��fd�Zej
ejW�jfd�Z�fd�Z	�xZ
S)�+StructTest.test_integers.<locals>.IntTesterc�V��t�|�d��||_|d|_|dd|_|jt
vrt
d|jz��tj|�|_	|jdz|_
|jtd�vr:d|_d|jd	z
z|_
d|jd	z
zd	z
|_y|jtd
�vr&d|_d|_
d|jzd	z
|_yt
d
|jz��)N�test_one)�
methodNamer#z"unrecognized packing byteorder: %sr��bhilqnTr?r0�BHILQNFrzunrecognized format code: %s)�super�__init__rSrrr�
ValueErrorr2rB�bytesize�bitsize�tuple�signed�	min_value�	max_value)r5rS�	IntTester�	__class__s  ��r r�z4StructTest.test_integers.<locals>.IntTester.__init__�s����i��/�:�/�F�$���"�2�J��	�!'�������~�~��3�$�%I�%)�^�^�&4�5�5� &���� 7��
�#�}�}�q�0����9�9��h��/�"&�D�K�'(�4�<�<��>�':�%;�D�N�%&����a��%8�1�%<�D�N��Y�Y�%��/�1�"'�D�K�%&�D�N�%&����_�q�%8�D�N�$�%C�%)�Y�Y�&/�0�0r'c�:�|j}|j|cxkr|jk�rBn�n>|}|jr|dkr|d|jzz
}|j|d�d|z}t
|�dzrd|z}|jd�}||�}d|jt
|�z
z|z}|jdk(s|jdvrtst|�}|jt
|�|j�|||�}|j||�|||�d}|j||�|jtjt f||d	|z�y|jt"t$tjf|||�y)
Nrr0z%x�0�asciir�r)rrrr�)rSr�r�r�r�r�r��encoder�rr*r&r1r@r2rArC�
OverflowErrorr�)	r5�xr3rD�	unhexlifyrS�expected�got�	retrieveds	         r r�z4StructTest.test_integers.<locals>.IntTester.test_one�ss�������>�>�Q�8�$�.�.�8� �H��{�{�q�1�u� �A����$5�5���+�+�H�a�8�#�h��H��8�}�q�(�#&��>��'���w�7�H�(��2�H� '�4�=�=�3�x�=�+H� I� (�!)�H����#�-����.�8��#1�(�#;���$�$�S��]�D�M�M�B��v�q�/�C��$�$�S�(�3�!'�v�s� 3�A� 6�I��$�$�Q�	�2��%�%�v�|�|�Y�&?���AH�3��P��%�%�}�j�&�,�,�&O�&*�F�A�7r'c�H��ddlm}g}t|jdz�D]}|j	d|z��t|j�D]=}d}t|j
�D]}|dz|d�z}�|j	|��?|j
ddtjd	zg�|D])}||fD]}d
D]}||z}	|j|	���!�+Gd�d�}
Gd
�dt�}Gd�dt�}|jttjftj|j d�|jttjftj|j |�|jttjftj|j d�|jttjftj|j |
��|jttjftj|j |��|d�|d�|d�|d�|d�|d�fD]}
	tj�|
��|d�|d�|d�|ddi�|gd��fD]B}
|jttjftj|j |
��Dy#|j#d�Y��xYw)Nr)�	randranger9r0r��i,i`�
r�)r#rr0c��eZdZd�Zy)�AStructTest.test_integers.<locals>.IntTester.run.<locals>.NotAnIntc��y�N�*r$r4s r �__int__zIStructTest.test_integers.<locals>.IntTester.run.<locals>.NotAnInt.__int__���!r'N)�__name__�
__module__�__qualname__r�r$r'r �NotAnIntr�
s��"r'r�c��eZdZd�Zd�Zy)�BStructTest.test_integers.<locals>.IntTester.run.<locals>.Indexablec��||_yr)��_value)r5r+s  r r�zKStructTest.test_integers.<locals>.IntTester.run.<locals>.Indexable.__init__s	��&+��r'c��|jSr)r�r4s r �	__index__zLStructTest.test_integers.<locals>.IntTester.run.<locals>.Indexable.__index__s��#�{�{�*r'N)r�r�r�r�r�r$r'r �	Indexabler�s��,�+r'r�c��eZdZd�Zd�Zy)�AStructTest.test_integers.<locals>.IntTester.run.<locals>.BadIndexc��t�r))rCr4s r r�zKStructTest.test_integers.<locals>.IntTester.run.<locals>.BadIndex.__index__s��'�r'c��yr�r$r4s r r�zIStructTest.test_integers.<locals>.IntTester.run.<locals>.BadIndex.__int__r�r'N)r�r�r�r�r�r$r'r �BadIndexr�s��(�"r'r�za stringy@E@�
�r�rM�z:integer code pack failed on object with '__index__' methodrKr�a)r0r?r9)�randomr��ranger��appendr��extend�sys�maxsizer��objectr@rCr2rAr3rS�fail)r5r��valuesr�r�val�j�base�incrr�r�r�r��objrSs              �r �runz/StructTest.test_integers.<locals>.IntTester.run�s����,��� �����!1�2�,�C��M�M�!�s�(�+�,��t�|�|�,�'�A��C�"�4�=�=�1�:��"�a�x�9�S�>�9��:��M�M�#�&�	'��
�
�s�F�C�K�K��M�:�;�#�-�D� $�u�d�{�-��$,�-�D� #�d�
�A� �M�M�!�,�-�-�-�"�"�+��+�"�v�"��!�!�9�f�l�l�";�"(�+�+�t�{�{�",�.��!�!�9�f�l�l�";�"(�+�+�t�{�{�"+�-��!�!�9�f�l�l�";�"(�+�+�t�{�{�"'�)��!�!�9�f�l�l�";�"(�+�+�t�{�{�"*�*�.��!�!�9�f�l�l�";�"(�+�+�t�{�{�"*�*�.�
&�a�L�)�B�-��2��%�b�M�9�S�>�9�S�>�K�=�C�=����F�C�0�=�&�d�O�Y�s�^�Y�t�_�%�s�A�h�/��9�1E�G�+�C��%�%�y�&�,�,�&?�&,�k�k�4�;�;�&)�+�+��=��	�	�#<�=�s�L�L!)r�r�r�r�r2r3rDr�r�r��
__classcell__)r�r��binasciirSs@���r r�r��s3���
0�,(.�{�{�)/���,4�,>�,>�$
7�LR
+�R
+r'r�)r��unittest�TestCaser!r�)r5rrrQr�r�rSs    @@@r �
test_integerszStructTest.test_integers�sU����O	+�O	+��)�)�O	+�b 4�5�	�O�D�)��t�^�F��&�!�A�
�E�E�G�	r'c�����fd�}dD]U}dD]N}||z}|tj|�|tj|d�|tj|d��P�Wy)Nc�����jtj�5}||i|��ddd��jdt	j
��y#1swY�/xYw)Nzbad char in struct format)r@r2rA�assertIn�str�	exception)�func�args�kwargs�cmr5s    �r �assertStructErrorz2StructTest.test_nN_code.<locals>.assertStructErrorHsQ����"�"�6�<�<�0�
&�B��d�%�f�%�
&��M�M�5�s�2�<�<�7H�I�
&�
&�s�	A�A!r�r�rr')r2rBr3rD)r5r�rrrSs`    r �test_nN_codezStructTest.test_nN_codeFs`���	J��	>�D�1�
>�	�"�4���!�&�/�/�6�:�!�&�+�+�v�q�9�!�&�-�-���=�	
>�	>r'c��dD]Y\}}}}tj||�}|j||�tj||�\}|j||��[y)N))�p�abcr�r')�1pr�r�r')�2pr�sarK)�3pr�sabsab)�4pr�sabcr�)�5pr�sabcr�)�6pr�sabcr�)�1000ps�xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxs��xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxs�xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r2r3r1rD)r5r�inputr��expectedbackr�s      r �test_p_codezStructTest.test_p_codeSsa��4D�	0�/�D�%��<��+�+�d�E�*�C����S�(�+��]�]�4��-�F�S����S�,�/�	0r'c���tdd�D]�}d}||dzz
|k7r|dz}||dzz
|k7r�||z
}tjd|�}tjd|�d}|j	||�tjd|�}|j	|t|��tjd|�d}|j	||���d}t
j|d	�}tjd|�}tjd|�d}|j	||�d
}t
j|d�}|jttjd|�y)Nr0�!g�?r}z<frz>fi����hi����g)
r�r2r3rDr1r&�math�ldexpr@r�)r5r��delta�smaller�packed�unpacked�	bigpackedrs        r �test_705836zStructTest.test_705836csP���!�R�L�	-�D��E�����$��,���������$��,��U�l�G��[�[��w�/�F��}�}�T�6�2�1�5�H�
���T�8�,����D�'�2�I����Y��v�(>�?��}�}�T�9�5�a�8�H����T�8�,�	-�$���j�j��h�'�����T�3�'���=�=��v�.�q�1������h�'����j�j��h�'�����-����d�C�@r'c��t�D]j\}}||z}|jtjtj|d�|jtjtj|d��l|jtjtjdd�|jtjtjdd�y)N��?g�?r<)r!r@r2rAr3)r5rrrSs    r �test_1530559zStructTest.test_1530559�s���3�5�	F�O�D�)���%�F����f�l�l�F�K�K���E����f�l�l�F�K�K���E�	F�	
���&�,�,����S�#�>����&�,�,����S�#�>r'c	��d}d}tj|�}ttfD]�}||�}|j	|j|�d�|j	|j|d�d�|j	|j|d�d�t
d�D]+}|j	|j||�|||dzf��-t
dt|�d	z�D].}|jtj|j
||��0��ttfD�]}||�}|j	tj
||�d�|j	tj
||d�d�|j	tj
||d�d�t
d�D]0}|j	tj
|||�|||dzf��2t
dt|�d	z�D]3}|jtjtj
|||��5��|j	|j|d�
�d�y)Ns	abcd01234�4s)sabcdr?)scd01r�)s0123�r0)�buffer�offset)
r2�Struct�bytes�	bytearrayr1�unpack_fromr�r�r@rA)r5�test_stringrFr%�cls�datars       r �test_unpack_fromzStructTest.test_unpack_from�s$��"�����M�M�#����9�%�	H�C��{�#�D����Q�]�]�4�0�*�=����Q�]�]�4��3�Z�@����Q�]�]�4��3�Z�@��1�X�
I��� � ����t�Q�!7�$�q��1��+��H�
I��1�c�+�.��2�3�
H���!�!�&�,�,��
�
�t�Q�G�
H�	H��9�%�	R�C��{�#�D����V�/�/��T�:�J�G����V�/�/��T�1�=�z�J����V�/�/��T�1�=�z�J��1�X�
S��� � ��!3�!3�C��q�!A�D��1�Q�3�K�>�R�
S��1�c�+�.��2�3�
R���!�!�&�,�,��0B�0B�C��q�Q�
R�	R�	
������k�!��D�#�	%r'c���d}tjdd�}d}tj|�}|j|d|�|j	�dt|�}|j
||�|j|d|�|j	�dt|�dz}|j
||dd|z�tjdd�}|jttjf|j|d|�|jttjf|j|d|�|}|jttjftjd	|d�y)
N�Reykjavik rocks, eow!r�d                                                                                                    �21srr��
          r?r')�arrayr2r�	pack_into�tobytesr�r1r@r�rArC)r5r �writable_bufrFr%�from_buf�	small_buf�sbs        r �test_pack_intozStructTest.test_pack_into�sB��.���{�{�3��1�����M�M�#���	
���L�!�[�1��'�'�)�*;�3�{�+;�<������;�/�	
���L�"�k�2��'�'�)�*>�3�{�+;�B�+>�?������;�s��#3�k�#A�B��K�K��W�-�	����:�v�|�|�4�a�k�k�9�a�%�	'����:�v�|�|�4�a�k�k�9�a�%�	'������9�f�l�l�3�V�5E�5E�s�B��	 r'c���d}tjdd�}d��fd�}||d|�|j�dt|�}|j||�||d|�|j�dt|�dz}|j||dd|z�tjdd�}|j	t
tjf||d|�|j	t
tjf||d	|�y)
Nr%rr&r'c�0��tj�g|���Sr))r2r*)r�rFs �r �<lambda>z.StructTest.test_pack_into_fn.<locals>.<lambda>�s���&�"2�"2�3�">��">�r'rr�r(r?)r)r+r�r1r@r�r2rA)r5r r,r*r-r.rFs      @r �test_pack_into_fnzStructTest.test_pack_into_fn�s����.���{�{�3��1����>�	�	�,��;�/��'�'�)�*;�3�{�+;�<������;�/�	�,��K�0��'�'�)�*>�3�{�+;�B�+>�?������;�s��#3�k�#A�B��K�K��W�-�	����:�v�|�|�4�i��A�%�	'����:�v�|�|�4�i��A�%�	'r'c��tjdd�}td�}||fD],}tjd|�\}|j	|d��.y)Nr	s4Vxz>IixV4)r)�
memoryviewr2rDr1)r5�data1�data2r"r+s     r �test_unpack_with_bufferz"StructTest.test_unpack_with_buffer�sS�����C�!4�5���.�/���E�N�	0�D��]�]�4��.�F�E����U�J�/�	0r'c��Gd�dt�}td�dzD�]�}dggddf}dgd	d
ddd
f}|dt|�zz}tj|g|���}tj
||�}|dt|�zz}tj|g|���}	tj
||	�}
|j
t|�t|
��|j
t|�t|��|D]}|j|��|
D]}|j|��tj|dzd�}|j
t|�tj|dz��t|�dk7r|j|d|z��	tj|dz|��|jd|dzz����dD]*}
|jtj
d|
�d��,y#t$rY���wxYw)Nc��eZdZd�Zy)�+StructTest.test_bool.<locals>.ExplodingBoolc��t�r))�OSErrorr4s r �__bool__z4StructTest.test_bool.<locals>.ExplodingBool.__bool__�s���
r'N)r�r�r�r?r$r'r �
ExplodingBoolr<�s��
r'r@z<>!=)rr$rrr0�test�r#lg���Arz encoded bool is not one byte: %r)�msgz2Expected OSError: struct.pack(%r, ExplodingBool()))r�������z>?)r�r�r�r2r3rDr1�assertFalser�rBr�r>)r5r@rR�false�true�falseFormat�packedFalse�
unpackedFalse�
trueFormat�
packedTrue�unpackedTruerQrrOs              r �	test_boolzStructTest.test_bool�s���	�F�	��F�m�E�)�"	?�F���B��A�%�E��3���2�|�\�A�D� �3��U��#3�3�K� �+�+�k�:�E�:�K�"�M�M�+�{�C�M��#��D�	�/�1�J����Z�7�$�7�J�!�=�=��Z�@�L����S��Y��L�(9�:����S��Z��]�);�<�"�
$��� � ��#�
$�!�
#������"�
#��[�[����Q�/�F����S��[�&�/�/�&��*�*E�F��6�{�a��� � ��-O�.4�.5� �6�
?����F�S�L�-�/�:��	�	�-�06���>�?�C"	?�H?�	7�A��O�O�F�M�M�$��2�1�5�6�	7��
�
��
�s�G;�;	H�Hc�l�djtjdz�}|jtj
tj|�djtjdztjdz�}|jtj
tj|�y)Nz{}br0z{}b{}Hr?)rSr�r�r@r2rArB)r5�	hugecount�
hugecount2s   r �test_count_overflowzStructTest.test_count_overflow
sl���L�L����Q��/�	����&�,�,�����C��_�_�S�[�[�!�^�S�[�[�!�^�D�
����&�,�,�����Dr'c��tjdd�}|jtjtjd�|jtjtj
dd�|jtjtjd|d�|jtjtjd|d�|jtjtjdd�|jtjtj
dd�|jtjtjd|dd�|jtjtjd|d�|jtjtjd	d
�|jtjtj
d	d�|jtjtjd	|dd
�|jtjtjd	|d�y)Nrr&�12345r'r�c12345r��x�14s42z
spam and eggss
spam and eggs)r)r@r2rAr3rDr*r)r5�stores  r �test_trailing_counterz StructTest.test_trailing_counters������C��*��	
���&�,�,����W�=����&�,�,��
�
�w��D����&�,�,��(8�(8�'�5�!�L����&�,�,��(:�(:�G�U�A�N�	
���&�,�,����X�s�C����&�,�,��
�
�x��F����&�,�,��(8�(8�(�E�1��	 ����&�,�,��(:�(:�H�e��	�	
���&�,�,����W�o�N����&�,�,��
�
�w�*�	,����&�,�,��(8�(8�'�5�!�)�	+����&�,�,��(:�(:�G�U�A�Nr'c�P�tjd�}|jd�y)Nrr>)r2rr��r5r%s  r �test_Struct_reinitializationz'StructTest.test_Struct_reinitialization-s��
�M�M�#���	�
�
�4�r'c��tjd�}|tjd�|dzzz
}tj|tj
|�|�y)N�2n3P�P3n0Pr0)r�calcobjsizer2rB�check_sizeofr)r5�
format_str�number_of_codes�	totalsizes    r rdzStructTest.check_sizeof4sJ���'�'��/�	��V�_�_�W�-��1�1D�E�E�	����T�6�=�=��#<�i�Hr'c��tD]}|j|d��|jdd�|jdd�|jdd�|jdd	�|jd
d�|jdd�|jdd�|jd
d�|jdd	�y)Nr0�	BHILfdspP�	��BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBi��fdr?�xxxxxxxxxxxxxxr�100H�187s�20prb�0c)rrd)r5rs  r �test__sizeof__zStructTest.test__sizeof__;s���!�	'�D����d�A�&�	'����+�q�)����*�d�+����$��"����*�A�.����&�!�$����&�!�$����%��#����$��"����$��"r'c�b�d}|jtj|�5tjdt	d�dd�ddd�d}|jtj|�5tj
dt	d�d�ddd�y#1swY�UxYw#1swYyxYw)Nzkpack_into requires a buffer of at least 6 bytes for packing 1 bytes at offset 5 \(actual buffer size is 1\)rr0rBzounpack_from requires a buffer of at least 6 bytes for unpacking 1 bytes at offset 5 \(actual buffer size is 1\))�assertRaisesRegexr2rAr*rr�r5�regex1�regex2s   r �test_boundary_error_messagez&StructTest.test_boundary_error_messageIs���
+�	�
�
#�
#�F�L�L�&�
9�	6����S�)�A�,��1�5�	6�
+�	�
�
#�
#�F�L�L�&�
9�	5����s�I�a�L�!�4�	5�	5�	6�	6��	5�	5�s�"B�/!B%�B"�%B.c�~�td�}|jtjd�5tjd|dd�ddd�|jtjd�5tjd|dd�ddd�|jtjd	�5tj
d|d�ddd�|jtjd�5tj
d|d�ddd�y#1swY��xYw#1swY��xYw#1swY�bxYw#1swYyxYw)
Nr�z%no space to pack 4 bytes at offset -2�<I����{z*offset -11 out of range for 10-byte bufferz<Bi����z.not enough data to unpack 4 bytes at offset -2)rrtr2rAr*r)r5�	byte_lists  r �0test_boundary_error_message_with_negative_offsetz;StructTest.test_boundary_error_message_with_negative_offsetZs���b�M�	�
�
#�
#����8�:�	7�
���T�9�b�#�6�	7�
�
#�
#����<�>�	8�
���T�9�c�3�7�	8�
�
#�
#����A�C�	4�
���t�Y��3�	4�
�
#�
#����<�>�	5�
���t�Y��4�	5�	5�	7�	7��
	8�	8��
	4�	4��
	5�	5�s/�D�-D�.D'�.D3�D�D$�'D0�3D<c��dttjdz�zdzttj�zdz}|jtj
|�5t	jdtd�tjd�ddd�dttjdz�zd	zttj�zdz}|jtj
|�5t	jdtd�tj�ddd�y#1swY��xYw#1swYyxYw)
Nz(pack_into requires a buffer of at least r�z% bytes for packing 4 bytes at offset z \(actual buffer size is 10\)rzr�r0z*unpack_from requires a buffer of at least z' bytes for unpacking 4 bytes at offset )	r�r�r�rtr2rAr*rrrus   r �-test_boundary_error_message_with_large_offsetz8StructTest.test_boundary_error_message_with_large_offsetps��
8�#�c�k�k�A�o�:N�N�4�
5�7:�3�;�;�7G�
H�,�
-�	�
�
#�
#�F�L�L�&�
9�	B����T�9�R�=�#�+�+�q�A�	B�
:�C����a��<P�P�6�
7�9<�S�[�[�9I�
J�,�
-�	�
�
#�
#�F�L�L�&�
9�	A����t�Y�r�]�C�K�K�@�	A�	A�	B�	B��	A�	A�s� 0D/�7/D;�/D8�;Ec���|jt�5tjdd�ddd�|j	tjdd�d�y#1swY�0xYw)NrrrK)�a)r@rCr2rDr1r4s r �test_issue29802zStructTest.test_issue29802�sR���
�
�y�
)�	"��M�M�#�q�!�	"�	
������s�D�1�:�>�	"�	"�s�A�A%c��tjd�}|j|jd�tj|jj	��}|j|j|j�y)Nz=i2H)r2rr1rSr�)r5r%�s2s   r �test_format_attrzStructTest.test_format_attr�sW���M�M�&�!��������6�*��]�]�1�8�8�?�?�,�
-��������A�H�H�-r'c���d}td|�\}}}|j|d�|j|j�d�|jd|�|jd|�y)Nz�if 1:
            import struct

            class C:
                def __init__(self):
                    self.pack = struct.pack
                def __del__(self):
                    self.pack('I', -42)

            struct.x = C()
            z-crr'sException ignored in:s	C.__del__)rr1�rstripr�)r5r�rc�stdout�stderrs     r �)test_struct_cleans_up_at_runtime_shutdownz4StructTest.test_struct_cleans_up_at_runtime_shutdown�sa��
��.�d�D�9���F�F�����Q���������#�.��
�
�.��7��
�
�l�F�+r'c���tjd�}tj|�}|j	d�~tj�|j|�d�y)N�_structrz(_struct module was not garbage collected)r�import_fresh_module�weakref�refrB�gc�collect�assertIsNone)r5�_struct_module�
module_refs   r �'test__struct_reference_cycle_cleaned_upz2StructTest.test__struct_reference_cycle_cleaned_up�sU��
'�:�:�9�E���[�[��0�
�����$��	�
�
������L�D�	Fr'c�$�tj}ttjdd��}||fD]B}|j	|��5|jt�5d|_ddd�ddd��Dy#1swY�xYw#1swY�[xYw)NrrY)r!r0)r2r�type�iter_unpack�subTestr@rCr�)r5r�unpack_iteratorr!s    r �test__struct_types_immutablez'StructTest.test__struct_types_immutable�s��������v�1�1�#�t�<�=���O�,�	�C����#��&�
��&�&�y�1���C�E��
�
�	����
�
�s$�	B�A:�'B�:B�?B�B	c��dD]@}|jtjd�5tj|�ddd��By#1swY�MxYw)N)�z2ir�zembedded null character)rtr2rArBr^s  r �test_issue35714zStructTest.test_issue35714�sO��$�	#�A��'�'����(A�C�
#�����"�
#�
#�	#�
#�
#�s�A�A	c����fd�}dD]$}dD]}|||d��dD]}|||d���&d}|d|d�d	}|d|d�y)
Nc���||z}tj|�}|rd|dzzdz
}d}nd|dzdz
zdz
}d|dzdz
z}d|�d|�d|��}td�|dz
|dztd	�fD]]}�
j||�
�5�
j	tj
|�5tj||�ddd�ddd��_d}d}	�
j||	�
�5�
j	tj
|�5tj||	�ddd�ddd�y#1swY�sxYw#1swY��xYw#1swY�*xYw#1swYyxYw)
Nr?r�r0r�'z' format requires z <= number <= g�d~�Q�g�d~�QJ)re�numberz#required argument is not an integerr)r2rBrNr�rtrAr3)rR�int_type�is_unsigned�fmt_strr��max_�min_�	error_msgr��
not_numberr5s          �r �test_error_msgz2StructTest.test_issue98248.<locals>.test_error_msg�sp����x�'�G��?�?�7�+�D���T�A�X���*�����T�A�X��\�*�Q�.���d�Q�h��l�+�+���H�:�%7��v�^�D�6�R�I��u�:�t�a�x����3�t�9�E�
5���\�\�W�V�\�D�5��/�/����i�H�5����G�V�4�5�5�5�
5�>�I��J�������D�
5��+�+�F�L�L�)�D�5��K�K���4�5�
5�
5�	5�5��5�5��5�5��
5�
5�sH�!D;�&D/�=D;�&!E�E�E�/D8�4D;�;E	�E	�E�E�@=<>�BHILQT�bhilqFrrrr$)r5r�rRr�s`   r �test_issue98248zStructTest.test_issue98248�ss���	5�(�	8�F�#�
7���v�x��6�
7�#�
8���v�x��7�
8�	8����s�H�d�+����s�H�e�,r'c�z���Gd�d����fd�}dD]}dD]
}|||z���|d�|d�y)Nc��eZdZd�Zy)�:StructTest.test_issue98248_error_propagation.<locals>.Div0c��ddzy)Nr0rr$r4s r r�zDStructTest.test_issue98248_error_propagation.<locals>.Div0.__index__�s	���A�r'N)r�r�r�r�r$r'r �Div0r��s��
r'r�c�����j|d��5�jt�5tj|���ddd�ddd�y#1swY�xYw#1swYyxYw)N�ZeroDivisionError)rer�)r�r@r�r2r3)r�r�r5s ��r �test_error_propagationzLStructTest.test_issue98248_error_propagation.<locals>.test_error_propagation�sb�������<O��P�
1��&�&�'8�9�1��K�K����0�1�
1�
1�1�1��
1�
1�s"�A$�A�A$�A!	�A$�$A-r��
BHILQbhilqrrr$)r5r�rRr�r�s`   @r �!test_issue98248_error_propagationz,StructTest.test_issue98248_error_propagation�sQ���	�	�	1�
�	:�F�(�
:��&�v��'8�9�
:�	:�	�s�#��s�#r'c��Gd�dtj�}|�}|j|jd�d�y)Nc���eZdZ�fd�Z�xZS)�?StructTest.test_struct_subclass_instantiation.<locals>.MyStructc�$��t�|�d�y)Nz>h)r�r�)r5r�s �r r�zHStructTest.test_struct_subclass_instantiation.<locals>.MyStruct.__init__�s����� ��&r')r�r�r�r�r�)r�s@r �MyStructr��s
���
'�
'r'r�i90s09)r2rr1r3)r5r��	my_structs   r �"test_struct_subclass_instantiationz-StructTest.test_struct_subclass_instantiation�s4��	'�v�}�}�	'��J�	��������.��<r'N)%r�r�r�r6rIr\r�r�r�r�rrrr#r0r4r9rQrUr\r_rdr�cpython_onlyrrrxr~r�r�r�r�r�r�r�r�r�r�r$r'r r.r.$s��F�?�*(�03)�j L�DX�t>�0� A�B?�%�6 �8'�.0�)7�VE�O�2�I�
���#��#�5�"5�,A�$?�.�,�$
F�
������#�
���-��-�B
���$��$�"=r'r.c�:�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
y	)
�UnpackIteratorTestzD
    Tests for iterative unpacking (struct.Struct.iter_unpack).
    c�����fd�}tjd�}|jd�}||�|jd�}||��jtj�5|jd�ddd��jtj�5|jd�ddd�tjd�}�jtj�5|jd�ddd��jtj�5|jd�ddd�y#1swY��xYw#1swY��xYw#1swY�[xYw#1swYyxYw)	Nc����j|tj��j|tj�yr))�assertIsInstancer�Iterator�Iterable)�itr5s �r �_check_iteratorz:UnpackIteratorTest.test_construct.<locals>._check_iterators+����!�!�"�c�l�l�3��!�!�"�c�l�l�3r'�>ibcpr's1234567s123456s12345678rs12)r2rr�r@rA)r5r�r%r�s`   r �test_constructz!UnpackIteratorTest.test_construct
s%���	4�
�M�M�'�"��
�]�]�3�
�����
�]�]�:�
&�����
�
�
�v�|�|�
,�	%�
�M�M�)�$�	%�
�
�
�v�|�|�
,�	'�
�M�M�+�&�	'�
�M�M�#���
�
�
�v�|�|�
,�	�
�M�M�#��	�
�
�
�v�|�|�
,�	!�
�M�M�%� �	!�	!�	%�	%��	'�	'��	�	��	!�	!�s0�-E�&E�4E �-E,�E�E� E)�,E5c��ttjd�jd��}|j	t
|�y)Nr�r')r�r2rr�r@rC)r5�iter_unpack_types  r �test_uninstantiablez&UnpackIteratorTest.test_uninstantiables2����
�
�g� 6� B� B�3� G�H�����)�%5�6r'c��tjd�}ttdd��}|j	|�}|jt
|�d�|jt
|�d�|jt
|�d�|jtt|�|jtt|�y)N�>IBr0��irB�i	r�)i
�)	r2rrr�r�r1�nextr@�
StopIteration�r5r%rr�s    r �test_iteratezUnpackIteratorTest.test_iterate#s����M�M�%� ���%��2�,���
�]�]�1�
������b��?�3�����b��#3�4�����b��#3�4����-��r�2����-��r�2r'c�d�tjd�}ttdd��}|j	t|��}|j
t|�d�|j
t|�d�|jtt|�|jtt|�y�Nr�r0�r�r�)
r2rrr�r�r6r1r�r@r�r�s    r �test_arbitrary_bufferz(UnpackIteratorTest.test_arbitrary_buffer-s���M�M�%� ���%��2�,���
�]�]�:�a�=�
)������b��?�3�����b��#3�4����-��r�2����-��r�2r'c��tj}tjd�}t	tdd��}|j
|�}|j||�d�t|�|j||�d�t|�|j||�d�t|�|j||�d�|jtt|�|j||�d�y)Nr�r0r�r9r?r)�operator�length_hintr2rrr�r�r1r�r@r�)r5�lhr%rr�s     r �test_length_hintz#UnpackIteratorTest.test_length_hint6s���
�
!�
!���M�M�%� ���%��2�,���
�]�]�1�
������B���#��R������B���#��R������B���#��R������B���#����-��r�2�����B���#r'c	�.�tjdttdd���}|j	t|�d�|j	t|�d�|j
tt
|�|j
tt
|�yr�)r2r�rr�r1r�r@r�)r5r�s  r �test_module_funcz#UnpackIteratorTest.test_module_funcEsl��
�
�
��u�U�1�b�\�':�
;������b��?�3�����b��#3�4����-��r�2����-��r�2r'c�R�ddddddddtd	�fd
td�fdg
}|D�]_\}}|ddd
�}|j|tjd|�d�|j|tjd|��|j|tjd|�d�|j|tjd|��t
jdk(rQ|j|tjd|�d�|j|tjd|����|j|tjd|�d�|j|tjd|����bgd�}|D]�\}}|jtjtjd|�d��|jtjtjd|ddd
��d����tjdtj�}|j|ddzd�tjdtj�}|j|ddzd�gd�}	|	D],\}}}|j|tj||���.gd�}
|
D]+\}}|jttj||��-dg}|D],\}}}|j|tj||���.y)N)s<r)s�r~)s�{g��@)s�?)sgp>)�g)s�g�s|z+infs�z-inf)sU5gT�?r#�<er�>e�little�e))r�s�)r�s�)r�s��)r�s|)r�s~)r�s�r0�~))r�sg`>)r�r�g`>)r�r�gP>)r���g�?)r�r�g������?)r��g�?)r�r�r�)r�s<g�?)r��<g�?)r�r�g�?)r��{�i�)r�r�i�)r�s�g`�)r���g`�)r�r�gP�)r�s�g�)r���g�)r�r�g�)r�s��i��))r����@)r���@)r��u�<�7~)r����)r���)r��u�<�7�)r�r�)r�r�)r�r�)r�r�)r�r�)r�r�)r�sg�g�����@)
�floatr1r2rDr3r�rr�r�isnan�nanr@r�)r5�&format_bits_float__cleanRoundtrip_list�le_bitsrP�be_bits�format_bits__nan_list�
formatcode�bitsr� format_bits_float__rounding_list�%format_bits_float__roundingError_list�+format_bits_float__doubleRoundingError_lists            r �test_half_floatz"UnpackIteratorTest.test_half_floatMs���
��"�!�!���
�%��-�(�
�%��-�(�)�2
�.�A�	?�J�G�Q��d��d�m�G����Q��
�
�d�G� <�Q� ?�@����W�f�k�k�$��&:�;����Q��
�
�d�G� <�Q� ?�@����W�f�k�k�$��&:�;��}�}��(�� � ��F�M�M�#�w�$?��$B�C�� � ��&�+�+�c�1�*=�>�� � ��F�M�M�#�w�$?��$B�C�� � ��&�+�+�c�1�*=�>�	?�!
��!6�	L��J���O�O�D�J�J�v�}�}�T�4�'@��'C�D�E��O�O�D�J�J�v�}�}�T�4��"��:�'F�q�'I�J�K�	L����T�4�8�8�,��������T�)�4�0����T�D�H�H�9�-��������T�)�4�0�,
�(�,$D�	?��J��a����T�6�;�;�z�1�#=�>�	?�1
�-� C�	I�M�J�����m�V�[�[�*�a�H�	I�

7�7
�3�$O�	?��J��a����T�6�;�;�z�1�#=�>�	?r'N)r�r�r��__doc__r�r�r�r�r�r�rr$r'r r�r�s+���!�*7�3�3�
$�3�f?r'r��__main__)�collectionsrr)r�rr�r�r2r�r�rAr�test.supportr�test.support.script_helperrrr*rrr!r&r,r�r.r�r��mainr$r'r �<module>r
s�����	����
�
���&�7��m�m�u�$��J�
�
(�
�$.�"��%�^=��"�"�^=�Bn?��*�*�n?�b�z���H�M�M�O�r'