403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/__pycache__/test_struct.cpython-315.opt-2.pyc
R
>lqj��c�x�]QHGs]QHGs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s
]PH,s]QH0G
s
]QH8Gs]QH@Gs]QHHGs\
O(Q6HsQsQs\Q2s\Q	2s\1Q
ksQsQsQ
Q\\O<2sQQ\O<2s \!Q6Xc\OD2P!P!)�)�abc)�combinations)�support)�
import_helper��assert_python_ok)�ComplexesAreIdenticalMixin�big�inf�nanc#�l �[FD#oSFDoUQ7c
UQ7cJV1w�	J	J%	P!3h)��r
�@)�n�N)�
integer_codes)�
byteorders�code�	byteorders&  �%C:\Python315\\Lib\test\test_struct.py�iter_integer_formatsrs5����
��#�I���*�t�z�/A���/�!�$��s�4�4�4c��UPPP/*!�N�)�ss&r�string_reverser s���T�r�T�7�N�c�6�[%cU![U2!r)�ISBIGENDIANr)�values&r�bigendian_to_nativer!#s���{����e�$�$rc�`�\sQs])snQsQsQsQsQsQs	Qs
QsQ	sQ
s
QsQsQ
sQsQsQsQsQsQsQsQs\O4Q2sQsQsQsQsQs Qs!Qs"\O4Q2s#Qs$\O4Q 2s%\O4Q!2s&Q"s'Q#s(Q$s)Q%s*Q&s+Q's,\-O\\O^9%f
\O`Q(2Q)2s1Q*s2Q+s3Q,s4Us5P!)-�
StructTestc�r�UO[OQ]2]*]6H[2P!)z=i)�assertEqual�struct�packr��selfs&r�test_isbigendian�StructTest.test_isbigendian*s'�����&�+�+�d�A�.�q�1�Q�6��Erc�j�UO[O[OQ2[OQ2oUO	U]*[OQ22QoQo[OU2o[OU2oUO	U]*U2UO[O[O
Q]2UO[O[O
Q]]]2UO[[O1[O
QQ2UO[[O1[O
QQ2UO[O[OQQ2[O
Q	]]2oUO[O[OQU2UO[O[OQU2P!)
�Z�i�iiizcbxxxxxxhhhhiillffd?z3c3b18x12h6i6l6f3d3?�foo�P�dsflap�ii)�assertRaisesr&�error�calcsizer%r'�	TypeError�unpack)r)�sz�fmt�fmt3�sz3rs&     r�test_consistence�StructTest.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�>rc�n�Qo]o]�oQoQoQoQoP	oQFCDo	QFCDo
V�*o
[OV�V#VEVgU2	o[OV�2vq�q�ooooUOV�2UOV�2UOV�2UOV�2UOUU2UO[	]dU*2[	]dU*22UO[	]dU*2[	]dU*22UOUU2CJ	CJ	P!)�ai��igo���!	@)r
r�<�>�=�!)z	xcbhilfd?z	xcBHILfd?)r&r'r8r%�int)r)�c�b�hr.�l�fr2�t�prefix�formatr�cp�bp�hp�ip�lp�fp�dp�tps&                   r�test_transitiveness�StructTest.test_transitivenessBs����
��������������3�F�4������K�K��1��q�Q�?��17���v�1I�.����B��B�� � ��'�� � ��'�� � ��'�� � ��'�� � ��Q�'�� � ��S�2�X���C�!�G��=�� � ��S�2�X���C�!�G��=�� � ��Q�'�5�4rc
��,QMQMQ	MQ
MQMQMQ
MQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQMQ MQ!MQ"MQ#MQ$MQ%MQ&MQ'MQ(MQ)MQ*MQ+MQ,MQ-MQ.MQ,QQ]1MQ/MoSFD�vq#qEoQU*U1QU*U1QU*U1QU*[9%cS9%fS11FD�vqx[OVs2o	UOV�2UO[OU2[U	22[OVy2]*o
V�6wfJ�UOU2J�	J�	P!)0rF��?rBrDrArC)rFr@r@r@r)�xcr@�ar\r)�cxr@�ar^r)rr@r@r@r)�0s�
helloworldrr�)�1sr`�hrcra)�9sr`�	helloworlrera)�10sr`r`r`r)�11sr`�helloworldrhra)�20sr`�helloworldrjra)�0pr`rrra)�1pr`rYrYra)�2pr`�hrnra)�10pr`�
	helloworlrpra)�11pr`�
helloworldrrr)�12pr`�
helloworldrtra)�20pr`�
helloworldrvra)rG��rxr)rGi������ryr)�Brwrxrxr)rz�ryryr)rH�����r)rHiD�����D�D�r)�Hr|r}r~r)r�iD�rr�r)r.�,�,���,r)r.�����������r)�Ir�r�r�r)r���b�wr�r�r)rIr�r�r�r)rIr�r�r�r)�Lr�r�r�r)r�r�r�r�r)rJ�@s@s@r)r2r�s@s@r)rJ��s�s�r)r2r�s�s�r)rZrrYrYr)rZ��r�ra)rZTr�r�r)rZ�rar�r�ra)rr&r'r%r6�lenr8�
assertTrue)r)�testsr:�argr	�lil�asy�xfmt�exp�res�revs&          r�test_new_features�StructTest.test_new_featuresZs���-
�&�-
�+�-
�
,�-
�
'�	-
�

/�-
�
1�
-
�
A�-
�
D�-
�
H�-
�
V�-
�
/�-
�
7�-
�
9�-
�
J�-
�
L�-
� 
P�!-
�"
\�#-
�$
&�%-
�&
+�'-
�(
&�)-
�*
,�+-
�,
4�--
�.
/�/-
�0
4�1-
�2
6�3-
�4
C�5-
�6
J�7-
�8
C�9-
�:
U�;-
�<
C�=-
�>
J�?-
�@
C�A-
�B
U�C-
�D
>�E-
�F
<�G-
�J
E�K-
�L
@�M-
�P
&�Q-
�R
&�S-
�T
)�U-
�V�"�e�U�A�&�W-
�X
)�Y-
��^(-�#�C�c��!$�S��#���S��#���S��#��!$�S��+�*=�*=�#�*D�*D�� E� G����k�k�$�,��� � ��*�� � �����!6��C��A��m�m�D�.�q�1���:��O�O�C�(� G�(-rc��Q]Q]Q]Q]Q]Q]Q]Q]Q]Q	]-
o[Q2FD;vq#V2*o[OU2oUOVQU*2J=	Q
oSFDdoQFDZo[OV7]**2o[OV7]**2o	UOV�2J\	Jf	UO[OQ2]2UO	][OQ22UO	][OQ22UO	[OQ2[OQ22UO	[OQ2[OQ22UO	][OQ22UO	[OQ2[OQ22UO[OQ
2[OQ22UO[OQ
2[OQ22P!)rGrzrHr�r.r�rIr��q�Qrr1�rCrArBrD)�bB�hH�iI�lL�nN�qQr)rr&r6r%�assertLessEqual�assertGreaterEqual)
r)�
expected_sizerrrM�size�native_pairs�format_pair�signed_size�
unsigned_sizes
&         r�
test_calcsize�StructTest.test_calcsize�s�����C����C����C����C����C���
� 4�4H�I�O�D��^�F��?�?�6�*�D����T��#6�7� J�:��'�K�$�	�$�o�o�i�a�.�.H�I�� &���	��N�0J� K�
�� � ��<�%�(�	
�������-�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�Krc�&�Qo[QQU2P!)z�import struct
struct.calcsize(b"!d"); struct.calcsize("!d")
struct.calcsize(">d"); struct.calcsize(b">d")
struct.Struct(b"i"); struct.Struct("i")
z-bb�-cr�r)rs& r�test_cache_bytes_vs_str_bb�%StructTest.test_cache_bytes_vs_str_bb�s��
8�	
�	���d�+rc�```�]PHnUUU1QkQ[O2n[2FD%vqV!*nRR2oUO	2J'	P!)rc�:``�\sQs]�snUU1Qks\O\OYO1Qks	U1Qks
QsUsU9s
!)�+StructTest.test_integers.<locals>.IntTesterc��:�[RU_QQ5VmUP*UmUPPUmUO[
7f[
QUO*2g[OU2Um	UO]*Um
UO[Q27cPP	Um]UO]*
*'Um
]UO]*
*]*
UmP!UO[Q27c0P
Um]Um
]UO*]*
UmP![
QUO*2g)�test_one)�
methodNamez"unrecognized packing byteorder: %s�bhilqn�BHILQNzunrecognized format code: %s)�super�__init__rMrrr�
ValueErrorr&r6�bytesize�bitsize�tuple�signed�	min_value�	max_value)r)rM�	IntTester�	__class__s&&��rr��4StructTest.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�0rc��UOoUOSt96:cUO6:Cc�LCL{SoUO%c"U]6cU]UO**
oUOU]2QU*o[
U2]*%c
QU*oUOQ2oUU2oQUO[
U2*
*U*oUOQ6XfUOQ7c[%f[U2oUO[
U2UO2UVQ2oUOVv2UVW2]*oUOV2UO[O[ 1V5QU*2P!UO["[$[O1V%U2P!)rz%x�0�asciirYrAr�)r
rrC)rMr�r�r�r�r�r��encoder�rrrr%r4r&r5r7�
OverflowErrorr�)	r)�xr'r8�	unhexlifyrM�expected�got�	retrieveds	&&&&&    rr��4StructTest.test_integers.<locals>.IntTester.test_one�sq�������>�>�Q�8�$�.�.�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�/�C��$�$�S�3�!'�v� 3�A� 6�I��$�$�Q�2��%�%�v�|�|�Y�&?��AH�3��P��%�%�}�j�&�,�,�&O�&*�A�7rc	�:�]QHGo,o[UO]*2FDoUO	]U*2J	[UO2FDIo]o[UO
2FDoU]*UQ2*oJ	UO	U2JK	UO
QQ[O]*,2SFD3oU'U1FD&oQFDoVX*o	UOU	2J	J(	J5	QQ2o
QQ[2oQ	Q
[2oUO[[O1[OUO Q2UO[[O1[OUO U2UO[[O1[OUO Q2UO[[O1[OUO U
22UO[[O1[OUO U22U]2U]
2U]2U]*2U]d2U]21FDo
[ORU
2J	UQ
2UQ2UP2UQ]-2U,QN21FDCo
UO[[O1[OUO U
2JE	P!SO#Q2J�9h)r)�	randrange��,i`�
c�(`�\sQsQsnQsQsUsP!)�AStructTest.test_integers.<locals>.IntTester.run.<locals>.NotAnInt� c��]*!��*rr(s&r�__int__�IStructTest.test_integers.<locals>.IntTester.run.<locals>.NotAnInt.__int__!���!rr)�__name__�
__module__�__qualname__�__firstlineno__r��__static_attributes__�__classdictcell__��
__classdict__s@r�NotAnIntr� s����"�"rr�c�.`�\sQsQsnQsQsQsUsP!)�BStructTest.test_integers.<locals>.IntTester.run.<locals>.Indexable�'c��VmP!r��_value)r)r s&&rr��KStructTest.test_integers.<locals>.IntTester.run.<locals>.Indexable.__init__(s��&+�rc��UO!rr�r(s&r�	__index__�LStructTest.test_integers.<locals>.IntTester.run.<locals>.Indexable.__index__+s��#�{�{�*rr�)r�r�r�r�r�r�r�r�r�s@r�	Indexabler�'s����,�+�+rr�c�.`�\sQsQsnQsQsQsUsP!)�AStructTest.test_integers.<locals>.IntTester.run.<locals>.BadIndex�0c��[gr)r7r(s&rr��KStructTest.test_integers.<locals>.IntTester.run.<locals>.BadIndex.__index__1s��'�rc��]*!r�rr(s&rr��IStructTest.test_integers.<locals>.IntTester.run.<locals>.BadIndex.__int__4r�rr)r�r�r�r�r�r�r�r�r�s@r�BadIndexr�0s����(�"�"rr�za stringz:integer code pack failed on object with '__index__' methodr@rG�a)���rray@E@)ra�r�)�randomr��ranger��appendr��extend�sys�maxsizer��objectr4r7r&r5r'rM�fail)r)r��valuesr�r.�val�j�base�incrr�r�r�r��objrMs&             �r�run�/StructTest.test_integers.<locals>.IntTester.runs����,��� �����!1�2�C��M�M�!�s�(�+�3��t�|�|�,�A��C�"�4�=�=�1��"�a�x�9�S�>�9��2��M�M�#�&�	-��
�
�s�F�C�K�K��M�:�;�#�D� $�u�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�K�&�d�O�Y�s�^�Y�t�_�%�s�A�h�/��9�1E�G�C��%�%�y�&�,�,�&?�&,�k�k�4�;�;�&)�+�G��=��	�	�#<�=�s�0L>�>M)r�rr�rrMr�r�r�)r�r�r�r�r�r&r'r8r�r�rr�r��
__classcell__)r�r�r��binasciirMs@@���rr�r��s5����
0�,(.�{�{�)/���,4�,>�,>�$
7�LR
+�R
+rr�)r�unittest�TestCaserr)r)rrrKr�rrMs&   @@@r�
test_integers�StructTest.test_integers�sL����O	+�O	+��)�)�O	+�b 4�5�O�D��^�F��&�!�A�
�E�E�G� 6rc	��`�U1QkoQFD\oQFDRoV2*oU[OU2U[OU]2U[OUQ2JT	J^	P!)c��:�RO[O29^tt^2oUU-U@PPP2ROQ[	WO
22P!)%fhK79h)Nzbad char in struct format)r4r&r5�assertIn�str�	exception)�func�args�kwargs�cmr)s&*, �r�assertStructError�2StructTest.test_nN_code.<locals>.assertStructError^sM����"�"�6�<�<�0�0�B��d�%�f�%�1��M�M�5�s�2�<�<�7H�I�1�0�s�
A#�#A3	�,A3	r�rr�)r&r6r'r8)r)rrrrMsf    r�test_nN_code�StructTest.test_nN_code\sT���	J��D�1�	�"���!�&�/�/�6�:�!�&�+�+�v�q�9�!�&�-�-���=�	2�rc���QFDVvqq4[OV2oUOVS2[OV2voUOVT2JX	P!)rk)	)rk�abcrr)�pr$rYr)rlr$rYr)rmr$sar@)�3pr$sabsab)�4pr$sabcr$)�5pr$sabcr$)�6pr$sabcr$)�1000ps�xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxs��xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxs�xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r&r'r%r8)r)r�inputr��expectedbackr�s&     r�test_p_code�StructTest.test_p_codeisQ��	4D�/�D���+�+�d�*�C����S�+��]�]�4�-�F�S����S�/�	4Drc�x�[]]!2FD�oQoVQ**
U6wcUQ*oJV*
o[OQU2o[OQU2]*oUO	V2[OQU2oUO	U[U22[OQU2]*oUO	V2J�	Q	o[OU]h2o[OQU2o[OQU2]*oUO	Vu2Q
o[OU]g2oUO[[OQU2UO[[OQU2UO[[OQU2Qo[OU]2o[OQU2o[OQU2]*oUO	Vu2Qo[OU]2oUO[[OQU2UO[[OQU2UO[[OQU2P!)
rag�?r��<f�>frJ�>e�<e�ei���i���i�i�)
rr&r'r8r%r�math�ldexpr4r�)r)r�delta�smaller�packed�unpacked�	bigpackedr	s&       r�test_705836�StructTest.test_705836zs���!�R�L�D��E����$��,������l�G��[�[��w�/�F��}�}�T�6�2�1�5�H�
���T�,����D�'�2�I����Y��v�(>�?��}�}�T�9�5�a�8�H����T�,�!�$���j�j��h�'�����T�3�'���=�=��v�.�q�1������'����j�j��h�'�����-����d�C�@����-����d�C�@����-����c�3�?����j�j��g�&�����T�3�'���=�=��v�.�q�1������'����j�j��g�&�����-����d�C�@����-����d�C�@����-����c�3�?rc��[2FDmvqV!*oUO[O[OUQ2UO[O[OUQ2Jo	UO[O[OQQ2UO[O[OQQ2P!)��?��?r1)rr4r&r5r')r)rrrMs&   r�test_1530559�StructTest.test_1530559�s���3�5�O�D��%�F����f�l�l�F�K�K���E����f�l�l�F�K�K���E� 6�	
���&�,�,����S�#�>����&�,�,����S�#�>rc���QoQo[OU2o[[1FD�oUU2oUO	UOU2Q2UO	UOU]2Q2UO	UOU]2Q2[
]2FD.oUO	UOVV2VVU]*12J0	[
][U2]*2FD.oUO[OUO
VV2J0	J�	[[1FCDoUU2oUO	[O
V%2Q2UO	[O
V%]2Q2UO	[O
V%]2Q2[
]2FD4oUO	[O
V%U2VVU]*12J6	[
][U2]*2FD3oUO[O[O
V%U2J5	CJ	UO	UOU]Q5Q2P!)s	abcd01234�4s)�buffer�offset)sabcd)scd01)s0123)
r&�Struct�bytes�	bytearrayr%�unpack_fromrr�r4r5)r)�test_stringr:r�cls�datar.s&      r�test_unpack_from�StructTest.test_unpack_from�s���"�����M�M�#����9�%�C��{�#�D����Q�]�]�4�0�*�=����Q�]�]�4��3�Z�@����Q�]�]�4��3�Z�@��1�X��� � ����t�!7�$��1��+��H���1�c�+�.��2�3���!�!�&�,�,��
�
�t�G�4�&��9�%�C��{�#�D����V�/�/��:�J�G����V�/�/��1�=�z�J����V�/�/��1�=�z�J��1�X��� � ��!3�!3�C�q�!A�D�1�Q�3�K�>�R���1�c�+�.��2�3���!�!�&�,�,��0B�0B�C�q�Q�4�&�	
������k�!��D�#�	%rc���Qo[[OQQ22oUU]U2UO2P[U2oUO	VB2UU]
U2UO2P[U2]
*oUO	VBQ*U*2UUQU2UO2QQ[U2*oUO	VB2[OQQ2oUO[[O129^tt^2UU]U2PPP2UO[[O129^tt^2UU]ZU2PPP2UO[[O129^tt^2UUQ	U2PPP2UO[[O129^tt^2UU]�U2PPP2UO[[O129^tt^2UUQ
U2PPP2UO[UQ]U2UO[UQ]U2UO[U],]d*]U2UO[UP]U2UO[VQ*]U2UO[VPPP/*]U2UO[29^tt^2UUPU2PPP2UO[29^tt^2UUQU2PPP2UO[29^tt^2UU]Q*U2PPP2UO[29^tt^2UU]Q*'U2PPP2P!)%fhCK�9h)%fhCKc9h)%fhCK79h)%fhCK9h)%fhCK�9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)sReykjavik rocks, eow!rG:N�
N:NNr�����d                                                                                                    i��s
          i����ij���zd                                                                                                    )�
memoryview�array�tobytesr�r%r4r�r&r5r7r�)r)�	pack_intorK�writable_buf�from_buf�	small_bufs&&    r�_test_pack_into�StructTest._test_pack_into�sB��.��!�%�+�+�c�8�"<�=��	�,��;�/��'�'�)�*;�3�{�+;�<������/�	�,��K�0��'�'�)�*>�3�{�+;�B�+>�?������s�#3�k�#A�B�	�,��[�1��'�'�)�#�c�#�k�2B�.B�C������/��K�K��W�-�	�
�
�
�
�F�L�L�9�
:�
:��i��K�0�;�
�
�
�
�F�L�L�9�
:�
:��l�B��4�;�
�
�
�
�F�L�L�9�
:�
:��l�C��5�;�
�
�
�
�F�L�L�9�
:�
:��l�C��5�;�
�
�
�
�F�L�L�9�
:�
:��l�D�+�6�;�	
���)�Y��!�[�I����)�Y���K�H����)�Y���C���K�H����)�Y��a��E����)�Y�S�0A�1�k�R����)�Y�T�r�T�0B�A�{�S��
�
�y�
)�
)��l�D�+�6�*�
�
�
�y�
)�
)��l�C��5�*�
�
�
�}�
-�
-��l�A�t�G�[�9�.�
�
�
�}�
-�
-��l�Q��W�H�k�:�.�
-�5;�
:�
:��
:�
:�
:��
:�
:�
:��
:�
:�
:��
:�
:�
:��*�
)�
)��
)�
)��
-�
-��
-�
-�
-�s��)N:�)O�)O"�)O6�)P
�P�6P2�&Q�Q�:O	�O	�O	�O	�"O3	�+O3	�6P	�?P	�
P	�P	�P/	�'P/	�2Q	�;Q	�Q	�Q	�Q)	�!Q)	c�j�[OQ2oUOUO2P!��21s)r&rGr\rX�r)rs& r�test_pack_into�StructTest.test_pack_into�s"���M�M�%� �����Q�[�[�)rc�0�QoUOU2P!)c�6�[OQ,UN3!r_)r&rX)rs*r�<lambda>�.StructTest.test_pack_into_fn.<locals>.<lambda>s��&�"2�"2�5�"@�4�"@r)r\)r)rXs& r�test_pack_into_fn�StructTest.test_pack_into_fns��@�	����Y�'rc��[OQQ2o[Q2oV1FD.o[OQU2voUO	UQ2J0	P!)rzs4Vxz>IixV4)rVrUr&r8r%)r)�data1�data2rMr s&    r�test_unpack_with_buffer�"StructTest.test_unpack_with_buffersL�����C�!4�5���.�/���N�D��]�]�4��.�F�E����U�J�/�#rc	��QQ[2o[Q2Q*FCD�oQ
,,P]1o],Q]PQQ1oUQ[U2**o[OU,UN3o[O
VV2oUQ[U2**o[OU,UN3o	[O
V�2o
UO
[U2[U
22UO
[U2[U22SFDoUOU2J	S
FDoUOU2J	[OUQ*]2oUO
[U2[OUQ*22[U2]6wcUOUQU*Q5[OUQ*U22UOQUQ**2CJ�	QFD�o
UO[O
QU
2]*2UO[O
Q	U
2]*2UO[O
Q
U
2]*2UO[O
QU
2]*2J�	P![cCJ�h9h)c�(`�\sQsQsnQsQsUsP!)�+StructTest.test_bool.<locals>.ExplodingBool�c��[gr)�OSErrorr(s&r�__bool__�4StructTest.test_bool.<locals>.ExplodingBool.__bool__s���
rr)r�r�r�r�rur�r�r�s@r�
ExplodingBoolrqs����
�
rrwz<>!=�testrZz encoded bool is not one byte: %r)�msgz2Expected OSError: struct.pack(%r, ExplodingBool())z>?z<?z=?z@?)r
rlg���A)r�������)rr�r�r&r'r8r%�assertFalser�r6rrt)r)rwrL�false�true�falseFormat�packedFalse�
unpackedFalse�
trueFormat�
packedTrue�unpackedTruerKr9rFs&             r�	test_bool�StructTest.test_bools<��	�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�!�=�=��@�L����S��Y��L�(9�:����S��Z��]�);�<�"��� � ��#�#�!������"�"��[�[����Q�/�F����S��[�&�/�/�&��*�*E�F��6�{�a��� � ��-O�.4�.5� �6�
?����F�S�L�-�/�:��	�	�-�06���>�?�C*�H?�A��O�O�F�M�M�$��2�1�5�6��O�O�F�M�M�$��2�1�5�6��O�O�F�M�M�$��2�1�5�6��O�O�F�M�M�$��2�1�5�6�	?��
�
��
�s�#K�	K�K�Kc��QO[O]*2oUO[O
[OU2QO[O]*[O]*2oUO[O
[OU2QO[O]*[O]*2oUO[O
[OU2QO[O2oUO[O
[OU2QO[O2oUO[O
[OU2P!)z{}bz{}b{}Hz{}i{}qz{}?sz{}?p)rMrrr4r&r5r6)r)�	hugecount�
hugecount2�
hugecount3�
hugecount4�
hugecount5s&     r�test_count_overflow�StructTest.test_count_overflow=s���L�L����Q��/�	����&�,�,�����C��_�_�S�[�[�!�^�S�[�[�!�^�D�
����&�,�,�����D��_�_�S�[�[�A�%5�s�{�{�a�7G�H�
����&�,�,�����D��]�]�3�;�;�/�
����&�,�,�����D��]�]�3�;�;�/�
����&�,�,�����Drc���[OQQ	2oUO[O[OQ2UO[O[O
QQ2UO[O[OQU]2UO[O[OQU]2UO[O[OQQ2UO[O[O
QQ2UO[O[OQU]Q2UO[O[OQU]2UO[O[OQQ2UO[O[O
QQ2UO[O[OQU]Q2UO[O[OQU]2P!)
rG�12345r�c12345r��x�14s42z
spam and eggss
spam and eggsrT)rVr4r&r5r'r8rXrJ)r)�stores& r�test_trailing_counter� StructTest.test_trailing_counterMs������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�Nrc	��[OQ2oQoUO[U29^tt^2UO	Q2PPP2UOUOQ2QoUOUO]]2U2UOUOU2Q2UO	Q2UOUOQ2UOUO]]2U2UOUOU2Q2UO[U29^tt^2UO[29^tt^2UO	Q2PPP2PPP2UOUOQ2UOUO]]2U2UOUOU2Q2UO[U29^tt^2UO[O29^tt^2UO	Q2PPP2PPP2UOUOQ2UOUO]]2U2UOUOU2Q2P!)%fhCKh9h)%fhCKU9h)%fhCKa9h)%fhK�9h)%fhK�9h)�>hz"Re-initialization .* will not workz>hhs���$)rar�)r&rG�assertWarnsRegex�
FutureWarningr�r%rMr'r8r4r�r5)r)rryr9s&   r�test_Struct_reinitialization�'StructTest.test_Struct_reinitializationfs��
�M�M�$���2��
�
"�
"�=�#�
6�
6�
�J�J�u��7�������5�)�$���������1��v�.�������&�)�6�2�	�
�
�5��������5�)��������1��v�.�������&�)�6�2�
�
"�
"�=�#�
6�
6��"�"�:�.�.��
�
�8�$�/�7�	
������5�)��������1��v�.�������&�)�6�2�
�
"�
"�=�#�
6�
6��"�"�6�<�<�0�0��
�
�3��1�7�	
������5�)��������1��v�.�������&�)�6�2�17�
6�
6��/�.�.��7�
6�
6��1�0��7�
6�sq�J)�K�J=	�1K�>(K8�&K%	�8K8�)J:	�2J:	�=K
�K
�	K�K"	�K"	�%K5
�.K5
�0K8�8L	�L	c���[OQ2oU[OQ2U]***
o[OU[O
U2U2P!)z2n3P?0P�P3n0P)r�calcobjsizer&r6�check_sizeofrG)r)�
format_str�number_of_codes�	totalsizes&&& rr��StructTest.check_sizeof�sJ���'�'�	�2�	��V�_�_�W�-��1�1D�E�E�	����T�6�=�=��#<�i�Hrc��[FDoUOU]2J	UOQ]	2UOQQ2UOQ]2UOQ]2UOQ]2UOQ]2UOQ]2UOQ]2UOQ	]2UOQ
]2P!)ra�	BHILfdspPi��fd�xxxxxxxxxxxxxx�100H�187srur_rk�0c��BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB)rr�r�s& r�test__sizeof__�StructTest.test__sizeof__�s���!�M�D����d�A�&�"����+�q�)����*�d�+����$��"����*�A�.����&�!�$����&�!�$����%��#����$��"����$��"����$��"rc��QoUO[OU29^tt^2[OQ[	]2]]2PPP2QoUO[OU29^tt^2[O
Q[	]2]2PPP2P!)%fhKf9h)%fhP!9h)zkpack_into requires a buffer of at least 6 bytes for packing 1 bytes at offset 5 \(actual buffer size is 1\)rGzounpack_from requires a buffer of at least 6 bytes for unpacking 1 bytes at offset 5 \(actual buffer size is 1\))�assertRaisesRegexr&r5rXrIrJ�r)�regex1�regex2s&  r�test_boundary_error_message�&StructTest.test_boundary_error_message�s���
+�	�
�
#�
#�F�L�L�&�
9�
9����S�)�A�,��1�5�:�
+�	�
�
#�
#�F�L�L�&�
9�
9����s�I�a�L�!�4�:�
9�:�
9��:�
9�
9�s#�#B-�"C�-B=	�6B=	�C	�	C	c��[]
2oUO[OQ29^tt^2[OQUQ]{2PPP2UO[OQ29^tt^2[OQUQ]{2PPP2UO[OQ29^tt^2[O
QUQ2PPP2UO[OQ29^tt^2[O
QUQ2PPP2P!)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)rQz%no space to pack 4 bytes at offset -2�<Iz*offset -11 out of range for 10-byte bufferz<Bz.not enough data to unpack 4 bytes at offset -2���i����)rIr�r&r5rXrJ)r)�	byte_lists& r�0test_boundary_error_message_with_negative_offset�;StructTest.test_boundary_error_message_with_negative_offset�s(���b�M�	�
�
#�
#����8�:�:�
���T�9�b�#�6�:�
�
#�
#����<�>�>�
���T�9�c�3�7�>�
�
#�
#����A�C�C�
���t�Y��3�C�
�
#�
#����<�>�>�
���t�Y��4�>�>�:�:��
>�>��
C�C��
>�>�>�sG�D5�?E�	E�E.�5E	�>E	�E	�E	�E+	�$E+	�.E?	�7E?	c�$�Q[[O]*2*Q*[[O2*Q*oUO[O
U29^tt^2[OQ[]
2[O]2PPP2Q[[O]*2*Q*[[O2*Q*oUO[O
U29^tt^2[OQ[]
2[O2PPP2P!)%fhK�9h)%fhP!9h)z(pack_into requires a buffer of at least z% bytes for packing 4 bytes at offset z \(actual buffer size is 10\)r�z*unpack_from requires a buffer of at least z' bytes for unpacking 4 bytes at offset )	rrrr�r&r5rXrIrJr�s&  r�-test_boundary_error_message_with_large_offset�8StructTest.test_boundary_error_message_with_large_offset�s��
8�#�c�k�k�A�o�:N�N�4�
5�7:�3�;�;�7G�
H�,�
-�	�
�
#�
#�F�L�L�&�
9�
9����T�9�R�=�#�+�+�q�A�:�
:�C����a��<P�P�6�
7�9<�S�[�[�9I�
J�,�
-�	�
�
#�
#�F�L�L�&�
9�
9����t�Y�r�]�C�K�K�@�:�
9�:�
9��:�
9�
9�s$�=1E+�10E>�+E;	�4E;	�>F	�F	c��UO[29^tt^2[OQ]2PPP2UO	[OQQ2Q2P!)%fhK99h)rGr@)�a)r4r7r&r8r%r(s&r�test_issue29802�StructTest.test_issue29802�sN���
�
�y�
)�
)��M�M�#�q�!�*�	
������s�D�1�:�>�*�
)�s�A(�(A8	�1A8	c��[OQ2oUOUOQ2[OUOO	22oUOUOUO2P!)�=i2H)r&rGr%rMr�)r)r�s2s&  r�test_format_attr�StructTest.test_format_attr�sW���M�M�&�!��������6�*��]�]�1�8�8�?�?�,�
-��������A�H�H�-rc���Qo[QU2vq#oUOU]2UOUO2Q2UOQU2UOQU2P!)z�if 1:
            import struct

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

            struct.x = C()
            r�rs+Exception ignored while calling deallocators	C.__del__)rr%�rstripr)r)r�rc�stdout�stderrs&    r�)test_struct_cleans_up_at_runtime_shutdown�4StructTest.test_struct_cleans_up_at_runtime_shutdown�s_��
��.�d�D�9���F�����Q���������#�.��
�
�D�f�M��
�
�l�F�+rc���[OQ2o[OU2oUO	Q2=[
O2UOU2Q2P!)�_structrGz(_struct module was not garbage collected)r�import_fresh_module�weakref�refr6�gc�collect�assertIsNone)r)�_struct_module�
module_refs&  r�'test__struct_reference_cycle_cleaned_up�2StructTest.test__struct_reference_cycle_cleaned_up�sU��
'�:�:�9�E���[�[��0�
�����$��	�
�
������L�D�	Frc�l�[Oo[[OQQ22oV1FDSoUO	UQ59^tt^2UO[29^tt^2]UmPPP2PPP2JU	P!)%fhK9h)%fhJ}9h)rGr�)rL)r&rG�type�iter_unpack�subTestr4r7r�)r)rG�unpack_iteratorrLs&   r�test__struct_types_immutable�'StructTest.test__struct_types_immutablesz�������v�1�1�#�t�<�=���,�C����#��&�&��&�&�y�1�1��C�E�2�'�&�-�1�1��'�&�&�s0�B"	�1B
�9B"	�B�B�B"	�"B3
�+B3
c	���QFDJoUO[OQ29^tt^2[OU2PPP2JL	P!)%fhJa9h)�zembedded null character)r�z2irY)r�r&r5r6ras& r�test_issue35714�StructTest.test_issue35714sU��$�A��'�'����(A�C�C�����"�C�C�%�C�C�C�s�A	�A&
�A&
c	�`�U1QkoQFD)oQFDoUV#P	2J	QFDoUV#P
2J	J+	QoUQUP	2QoUQUP
2P!)c�:�V*o[OU2oU%c]U]**]*
o]oL6]U]*]*
*]*
o]U]*]*
*'oQUQUQU0o[Q2U]*
U]*[Q21FDmoR
OV8Q59^tt^2R
O	[O
U29^tt^2[OV82PPP2PPP2Jo	QoPo	R
OV9Q59^tt^2R
O	[O
U29^tt^2[OV92PPP2PPP2P!)%fhK�9h)%fhCJ9h)%fhKB9h)%fhP!9h)r��'z' format requires z <= number <= g�d~�QJ)r��numberz#required argument is not an integerg�d~�Q�)r&r6rEr�r�r5r')rL�int_type�is_unsigned�fmt_strr��max_�min_�	error_msgr��
not_numberr)s&&&       �r�test_error_msg�2StructTest.test_issue98248.<locals>.test_error_msgs\����'�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���\�\�W�\�D�D��/�/����i�H�H����G�4�I�E�D�F�>�I��J������D�D��+�+�F�L�L�)�D�D��K�K��4�E�E�D�	I�H��E�D�D��E�D��E�D�D�s`�)F	�1F
�F	�:)G�#F4	�:G�F�F�F	�F1
�(F1
�4G
�=G
�?G�G	�G	�@=<>�BHILQ�bhilqrrrr)r)r�rLr�sf   r�test_issue98248�StructTest.test_issue98248s`���	5�(�F�#���v��6�$�#���v��7�$�����s�H�d�+����s�H�e�,rc�``�QQ2nUU1QkoQFDoQFDoUV#*2J	J	UQ2UQ2P!)c�(`�\sQsQsnQsQsUsP!)�:StructTest.test_issue98248_error_propagation.<locals>.Div0�>c��]]*P!r�rr(s&rr��DStructTest.test_issue98248_error_propagation.<locals>.Div0.__index__?s���A��rr)r�r�r�r�r�r�r�r�s@r�Div0r�>s����
�
rrc	�$:�ROUQQ59^tt^2RO[29^tt^2[OUR22PPP2PPP2P!)%fhK9h)%fhP!9h)�ZeroDivisionError)r�r)r�r4rr&r')r�rr)s&��r�test_error_propagation�LStructTest.test_issue98248_error_propagation.<locals>.test_error_propagationBs[�������<O��P�P��&�&�'8�9�9��K�K����0�:�Q�P�9�9��Q�P�P�s.�A>�A+	�A>�+A;
�4A;
�6A>�>B	�B	r��
BHILQbhilqrrr)r)rrLr�rsf   @r�!test_issue98248_error_propagation�,StructTest.test_issue98248_error_propagation<sE���	�	�	1�
�F�(��&�v�'8�9�)��	�s�#��s�#rc�J�QQ[O2oUQ2oUOUOQ2Q2UQQ5oUOUOQ2Q2QoUO	[
U29^tt^2UQ2oPPP2UOUOQ2Q2UO	[
U29^tt^2UQQ5oPPP2UOUOQ2Q2QoUO	[U29^tt^2U2oPPP2UOUOQ2Q2UO	[U29^tt^2UQQ	5oPPP2UOUOQ2Q2Q
oUO	[U29^tt^2UQ]*2oPPP2UOUOQ2Q2UO	[U29^tt^2UQ]*Q	5oPPP2UOUOQ2Q2UO	[U29^tt^2UQ]*Q5oPPP2UOUOQ2Q2UO	[U29^tt^2UQ]*Q5oPPP2UOUOQ2Q2QoUO	[UQ
*29^tt^2U]*2oPPP2UOUOQ2Q2UO	[UQ
*29^tt^2U]*Q5oPPP2UOUOQ2Q2UO	[UQ*29^tt^2UQ2oPPP2UOUOQ2Q2UO	[UQ*29^tt^2UQQ5oPPP2UOUOQ2Q2UO	[UQ*29^tt^2UQ2oPPP2UOUOQ2Q2UO	[UQ*29^tt^2UQQ5oPPP2UOUOQ2Q2P!)%fhCK9h)%fhCKB9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCKK9h)%fhCK
9h)%fhCK�9h)%fhCK�9h)%fhCKF9h)%fhCK9h)%fhCK�9h)%fhCK|9h)%fhCK89h)c�4``�\sQsQsnU1QksQsUsU9s!)�4StructTest.test_custom_struct_init.<locals>.MyStruct�Pc�(:�[RU_Q2P!�r��r�r�)r)rrr�s&*,�rr��=StructTest.test_custom_struct_init.<locals>.MyStruct.__init__Qs����� ��&rr)r�r�r�r�r�r�r�r�r�r�s@@r�MyStructrPs����
'�
'rrr��90�09�rMzMDifferent format arguments for __new__\(\) and __init__\(\) methods of Struct�<hz7Struct\(\) missing required argument 'format' \(pos 1\)�r�z/Struct\(\) takes at most 1 argument \(2 given\))rMr�z3Invalid 'format' argument for Struct\.__new__\(\): z	.*must bezbad charr�z	non-ASCIIr�)r&rGr%r'r�r��DeprecationWarning)r)r�	my_struct�warnmsgs&   r�test_custom_struct_init�"StructTest.test_custom_struct_initNs���	'�v�}�}�	'��T�N�	��������.��<��D�)�	��������.��<�b��
�
"�
"�=�'�
:�
:� ���I�;��������.��<�
�
"�
"�=�'�
:�
:� ��-�I�;��������.��<�L��
�
"�
"�#5�w�
?�
?� �
�I�@��������.��<�
�
"�
"�#5�w�
?�
?� �T�*�I�@��������.��<�D��
�
"�
"�#5�w�
?�
?� ��r�*�I�@��������.��<�
�
"�
"�#5�w�
?�
?� ��2�.�I�@��������.��<�
�
"�
"�#5�w�
?�
?� ��b�1�I�@��������.��<�
�
"�
"�#5�w�
?�
?� ��"�5�I�@��������.��<�H��
�
"�
"�#5�w��7L�
M�
M� ���I�N��������.��<�
�
"�
"�#5�w��7L�
M�
M� ��+�I�N��������.��<�
�
"�
"�#5�w��7K�
L�
L� ��
�I�M��������.��<�
�
"�
"�#5�w��7K�
L�
L� ��,�I�M��������.��<�
�
"�
"�#5�w��7L�
M�
M� ��*�I�N��������.��<�
�
"�
"�#5�w��7L�
M�
M� ��1�I�N��������.��<�_;�
:�
:��;�
:�
:��
@�
?�
?��@�
?�
?��
@�
?�
?��@�
?�
?��@�
?�
?��@�
?�
?��
N�
M�
M��N�
M�
M��M�
L�
L��M�
L�
L��N�
M�
M��N�
M�
M�s��	T
�
T!�1T5�
U	�
U�$U1�6V�V�#	V-�:
W�	W�)
W)�	W=�
X�
T	�T	�!T2	�*T2	�5U	�>U	�	U	�U	�U.	�&U.	�1V	�:V	�V	�V	�V*	�"V*	�-V>	�6V>	�W	�
W	�W&	�W&	�)W:	�2W:	�=X	�X	�X"	�X"	c	���QQ[O2oQFDkoUOUQ59^tt^2UU2oUOUOQ2UOUOQ2Q2PPP2Jm	UQQ5oUOUOQ2UOUOQ2Q2U2oUOUOQ2UOUOQ2Q2UQ]*2oUOUOQ2UOUOQ2Q2P!)%fhCJS9h)c�4``�\sQsQsnU1QksQsUsU9s!)�3StructTest.test_custom_struct_new.<locals>.MyStruct�c�&:�[RU_UQ2!r�r��__new__)rLrrr�s&*,�rr$�;StructTest.test_custom_struct_new.<locals>.MyStruct.__new__�s����w��s�D�1�1rr)r�r�r�r�r$r�r�rrs@@rrr �s����
2�
2rrr�rrrr)r�rr�r�u€r���)r&rGr�r%rMr')r)rrMrs&   r�test_custom_struct_new�!StructTest.test_custom_struct_new�s*��	2�v�}�}�	2�G�F����V��,�,�$�V�,�	�� � ��!1�!1�4�8�� � �����!6��D�-�,�G�
�D�)�	�����)�)�4�0��������.��<��J�	�����)�)�4�0��������.��<��T�2�&�	�����)�)�4�0��������.��<�-�,�,�s�AE	�E1
�(E1
c	�	�QQ[O2oUQQ2oUOUOQ2UOUO	Q2Q2UO[29^tt^2UQQ2PPP2UO[29^tt^2UQQ2PPP2UO[29^tt^2UQQ2PPP2UO[29^tt^2UQ	Q2PPP2UO[29^tt^2UO[29^tt^2UQQ	2PPP2PPP2UO[O29^tt^2UQ
Q2PPP2UO[29^tt^2UO[O29^tt^2UQQ
2PPP2PPP2UO[29^tt^2UQQ2PPP2UO[29^tt^2UQQ2PPP2UO[29^tt^2UO[29^tt^2UQQ2PPP2PPP2UO[29^tt^2UO[29^tt^2UQQ2PPP2PPP2UO[29^tt^2UQQ
2oPPP2UOUOQ2UOUO	Q2Q2P!)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCKw9h)%fhCK�9h)%fhCK^9h)%fhCK9h)%fhCK'9h)%fhCK9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK�9h)%fhCK|9h)c�@``�\sQsQsnU1QksU1QksQsUsU9s!)�<StructTest.test_custom_struct_new_and_init.<locals>.MyStruct�c�,:�[RU_U,UN3!rr#)rL�newargs�initargsr�s&&&�rr$�DStructTest.test_custom_struct_new_and_init.<locals>.MyStruct.__new__�s����w��s�5�W�5�5rc�4:�Ud[RU_UP!P!rr)r)r.r/r�s&&&�rr��EStructTest.test_custom_struct_new_and_init.<locals>.MyStruct.__init__�s����'��G�$�h�/�(rr)	r�r�r�r�r$r�r�r�rrs@@rrr+�s����
6�
0�
0rrr�rrrs90rrr�)r�)r�)r&)r)r&rGr%rMr'r4r7�assertWarnsr�r5r��r)rrs&  r�test_custom_struct_new_and_init�*StructTest.test_custom_struct_new_and_init�s ��	0�v�}�}�	0��W�g�.�	�����)�)�4�0��������.��<�
�
�
�y�
)�
)��R���*�
�
�
�y�
)�
)��W�b�!�*�
�
�
�y�
)�
)��R��!�*�
�
�
�y�
)�
)��U�G�$�*�
�
�
�m�
,�
,��"�"�9�-�-���%�(�.�-��
�
�v�|�|�
,�
,��V�W�%�-�
�
�
�m�
,�
,��"�"�6�<�<�0�0���&�)�1�-��
�
�z�
*�
*��[�'�*�+�
�
�
�z�
*�
*��Z��)�+�
�
�
�m�
,�
,��"�"�:�.�.���+�.�/�-��
�
�m�
,�
,��"�"�:�.�.���*�-�/�-��
�
�m�
,�
,� ��'�2�I�-�����)�)�4�0��������.��<�;*�
)�
)��
)�
)�
)��
)�
)�
)��
)�
)�
)��.�-�-��-�
,�
,��-�
,�
,��1�0�0��-�
,�
,��+�
*�
*��
*�
*�
*��/�.�.��-�
,�
,��/�.�.��-�
,�
,��-�
,�
,�sP�>
N�-
N�
N(�
N<�:O$�
O	�"O$�
O8�(P �0
P	�:P �'
P4�
Q�Q0�#
Q	�-Q0�R�8
R	�R�/
R,�N	�	N	�N%	�N%	�(N9	�1N9	�<O
	�O
	�O!
�O!
�	O$�$O5	�-O5	�8P		�P		�P
�P
�	P � P1	�)P1	�4Q	�=Q	�Q	�Q	�Q-
�%Q-
�'	Q0�0R	�9R	�R
�
R
�	R�R)	�!R)	�,R=	�5R=	c��QQ[O2oUQ2oUOUOQ2UOUO	Q2Q2UQQ5oUOUOQ2UOUO	Q2Q2UO[29^tt^2U2PPP2UO[29^tt^2U]*2PPP2UO[O29^tt^2UQ2PPP2UO[29^tt^2UQ2PPP2UO[29^tt^2UQ2PPP2UO[29^tt^2UQ]*2PPP2UO[29^tt^2UQ]*Q	5PPP2UO[29^tt^2U]*Q	5PPP2UO[29^tt^2UQQQ5PPP2P!)%fhCK�9h)%fhCKy9h)%fhCKU9h)%fhCK;9h)%fhCK!9h)%fhCK9h)%fhK�9h)%fhK�9h)%fhP!9h)
c��\sQsQsQsP!)�>StructTest.test_no_custom_struct_new_or_init.<locals>.MyStruct��r)r�r�r�r�r�rrrrr9�s��rrr�rrrr�r�r&r)	r&rGr%rMr'r4r7r5r�r4s&  r�!test_no_custom_struct_new_or_init�,StructTest.test_no_custom_struct_new_or_init�s���	�v�}�}�	��T�N�	�����)�)�4�0��������.��<��D�)�	�����)�)�4�0��������.��<�
�
�
�y�
)�
)��J�*�
�
�
�y�
)�
)��R�L�*�
�
�
�v�|�|�
,�
,��S�M�-�
�
�
�z�
*�
*��X��+�
�
�
�z�
*�
*��W��+�
�
�
�y�
)�
)��T�2��*�
�
�
�y�
)�
)��T�r�"�*�
�
�
�y�
)�
)����*�
�
�
�y�
)�
)��T�$�'�*�
)�!*�
)�
)��
)�
)�
)��
,�
,�
,��
*�
*�
*��
*�
*�
*��
)�
)�
)��
)�
)��
)�
)��
)�
)�
)�s��I�0	I)�(	I=�	J�	J%�2
J9�!K
�
K �K3�I&	�I&	�)I:	�2I:	�=J	�J	�J"	�J"	�%J6	�.J6	�9K
	�K
	�
K	�K	� K0	�)K0	�3L	�<L	c��[OQ2oUO[U2QUO8Q02P!)r�zStruct(�))r&rGr%�reprrMras& r�	test_repr�StructTest.test_repr�s1���M�M�&�!������a��G�A�H�H�<�q�"9�:rc
��[]PQQ]Q[['[,	]2Tt,tFD
o[UMJ	ooSFDsoQFDioUO	V4Q59^tt^2[
OU[
OVC22]*oUOV52PPP2Jk	Ju	P!ttoh)%fhJ�9h)rarR)�zrM�����)�F�D�Zf�Zdz>Fz>Dz>Zfz>Zdz<Fz<Dz<Zfz<Zd)	r�INF�NAN�complexr�r&r8r'�assertComplexesAreIdentical)r)�_rrCrJ�
round_trips&     r�test_c_complex_round_trip�$StructTest.test_c_complex_round_trip�s���'3�Q��C��q�57��s�d�C�5I�JK�(M�N�(M�!�'�1�+�(M��N��A���
�\�\�A�\�0�0�!'���q�&�+�+�a�2C�!D�Q�!G�J��4�4�Q�C�1�0����N�1�0�0�s�B8�"AB=
�=C�Cz4Subinterpreters are not supported on Android and iOSc�B�]QHGoQoU]Q59^tt^2oUO[U,]*2oUO[U2P,]*2PPP2P![c[OQ2gh9h)%fhP!9h)r)�InterpreterPoolExecutorz%InterpreterPoolExecutor not availablez
import struct)�max_workers)	�concurrent.futuresrS�ImportErrorr�SkipTest�map�exec�assertListEqual�list)r)rSr�executor�resultss&    r�&test_endian_table_init_subinterpreters�1StructTest.test_endian_table_init_subinterpreters�s���	M�B���
$��
3�
3�x��l�l�4�$��!��4�G�� � ��g�����
�;�4�
3��	�	M��#�#�$K�L�L�	M��4�
3�
3�s#�A(�AB
�(	B
�2B
�
B	�B	c���[OO[O2o[OQQ2oUO	[
UOU2UO	[
UO]2UO	[
UOU]2UO	[
UOU2UO	[
UOU2UO	[[UQ2UO	[
UO2UO	[
[U2UOUO P2P!)rG� rM)r&rGr$rVr4�RuntimeErrorr�r'rXr8rJ�AttributeError�getattr�
__sizeof__r?r%r�)r)�S�spams&  r�*test_operations_on_half_initialized_Struct�5StructTest.test_operations_on_half_initialized_Struct
s����M�M�!�!�&�-�-�0���{�{�3��%�����,��
�
�t�<����,�����2����,����T�1�=����,����$�7����,��
�
�t�<����.�'�1�h�?����,����5����,��a�0��������$rc���QFCD�oUOUQ59^tt^2[OU[OUQ22]*oUO	UQ2[OU[OU[
22]*oUO
[OU2U2[OU[OU[22]*oUO
[OU2U2UO	[OQU2Q2[OU[OU['22]*oUO
[OU2U2UO	[OQU2Q2PPP2CJ�	P!)%fhCJ�9h)rJrr@r?)	rJr0r1r2z<dz>dr4r3r2g�)r�r&r8r'r%rKr�r5�isnanrJ�isinf�copysign)r)rMrJs&  r�test_float_round_trip� StructTest.test_float_round_trips?��
�F�
���V��,�,��M�M�&�&�+�+�f�c�*B�C�A�F��� � ��C�(��M�M�&�&�+�+�f�c�*B�C�A�F������
�
�1�
�q�1��M�M�&�&�+�+�f�c�*B�C�A�F������
�
�1�
�q�1�� � ����s�A�!6��<��M�M�&�&�+�+�f�s�d�*C�D�Q�G������
�
�1�
�q�1�� � ����s�A�!6��=�-�,�
�
-�,�,�s�F,G	�G0
�'G0
r)6r�r�r�r�r*r=rVr�r�r�rr!r-r<rArNr\rbrhrmr�r�r�r�r�r�cpython_onlyr�r�r�r�r�r�r�r�r�r�r�rrr'r5r;r@rPr�skipIf�
is_android�is_apple_mobiler^rhrnr�r�r�s@rr#r#)sv����F�?�*(�0:)�x L�D,�X�t>�0�".@�`?�%�60;�d*�(�0�,7�\E� O�23�@I�
���#��#�5�"5�,A�$?�.�,�$
F�
������#�
���-��-�B
���$��$�";=�z=�*)=�V(�:;�D��_�_����5�5�g�5�5�>��<�	�<�%�>�>rr#c�L`�\sQsQsnQsQsQsQsQsQs	Qs
Q	sUsP!)
�UnpackIteratorTesti+c�t`�U1Qko[OQ2oUOQ2oUU2UOQ2oUU2RO[O29^tt^2UOQ2PPP2RO[O29^tt^2UOQ2PPP2[OQ2oRO[O29^tt^2UOQ2PPP2RO[O29^tt^2UOQ2PPP2P!)%fhK�9h)%fhK�9h)%fhKy9h)%fhP!9h)c�:�ROU[O2ROU[O2P!r)�assertIsInstancer�Iterator�Iterable)�itr)s&�r�_check_iterator�:UnpackIteratorTest.test_construct.<locals>._check_iterator1s+����!�!�"�c�l�l�3��!�!�"�c�l�l�3r�>ibcprs1234567s123456s12345678rBs12)r&rGr�r4r5)r)r|rr{sf   r�test_construct�!UnpackIteratorTest.test_construct0s���	4�
�M�M�'�"��
�]�]�3�
�����
�]�]�:�
&�����
�
�
�v�|�|�
,�
,�
�M�M�)�$�-�
�
�
�v�|�|�
,�
,�
�M�M�+�&�-�
�M�M�#���
�
�
�v�|�|�
,�
,�
�M�M�#��-�
�
�
�v�|�|�
,�
,�
�M�M�%� �-�
,�-�
,��
,�
,��-�
,��
,�
,�
,�sH�8E-�9F�F�F&�-E=	�6E=	�F	�	F	�F#	�F#	�&F7	�/F7	c��[[OQ2OQ22oUO	[
U2P!)r~r)r�r&rGr�r4r7)r)�iter_unpack_types& r�test_uninstantiable�&UnpackIteratorTest.test_uninstantiableEs2����
�
�g� 6� B� B�3� G�H�����)�%5�6rc��[OQ2o[[]]22oUO	U2oUO[
U2Q2UO[
U2Q2UO[
U2Q2UO[[U2UO[[U2P!)�>IB�i��i	rQ)i
�)	r&rGrHrr�r%�nextr4�
StopIteration�r)rrGr{s&   r�test_iterate�UnpackIteratorTest.test_iterateIs����M�M�%� ���%��2�,���
�]�]�1�
������b��?�3�����b��#3�4�����b��#3�4����-��r�2����-��r�2rc�j�[OQ2o[[]]22oUO	[U22oUO
[U2Q2UO
[U2Q2UO[[U2UO[[U2P!�r�r�r�)
r&rGrHrr�rUr%r�r4r�r�s&   r�test_arbitrary_buffer�(UnpackIteratorTest.test_arbitrary_bufferSs���M�M�%� ���%��2�,���
�]�]�:�a�=�
)������b��?�3�����b��#3�4����-��r�2����-��r�2rc��[Oo[OQ2o[	[]]22oUO
U2oUOUU2]2[U2UOUU2]2[U2UOUU2]2[U2UOUU2]2UO[[U2UOUU2]2P!)r�)�operator�length_hintr&rGrHrr�r%r�r4r�)r)�lhrrGr{s&    r�test_length_hint�#UnpackIteratorTest.test_length_hint\s���
�
!�
!���M�M�%� ���%��2�,���
�]�]�1�
������B���#��R������B���#��R������B���#��R������B���#����-��r�2�����B���#rc	�4�[OQ[[]]222oUO	[U2Q2UO	[U2Q2UO
[[
U2UO
[[
U2P!r�)r&r�rHrr%r�r4r�)r)r{s& r�test_module_func�#UnpackIteratorTest.test_module_funcksl��
�
�
��u�U�1�b�\�':�
;������b��?�3�����b��#3�4����-��r�2����-��r�2rc
�D�[OQ2oQ	Q
QQQ
QQQ[Q21Q[Q21Q,
oSFCD~vq4UPPP/*oUOU[O
QU2]*2UOU[OQU22UOU[O
QU2]*2UOU[OQU22[OQ6XcYUOU[O
QU2]*2UOU[OQU22CJ)UOU[O
QU2]*2UOU[OQU22CJ�	,QNoSFD�vqxUO[O[O
QU2]*22UO[O[O
QUPPP/*2]*22J�	UO%c]|o	L]~o	[OQ[O2o
UOU
]*]~*U	2[OQ[O'2o
UOU
]*]~*U	2,QNoSFD,vqxoUOU[OVt22J.	,QNoSFD*vqtUO[[OVt2J,	Q,o
S
FD,vqxoUOU[OVt22J.	P!)�	_testcapis|z+infs�z-infr3r2�littler4)s<r?)s�r�)s�{g��@)s�?)sgp>)�rR)s�rD)sU5gT�?))r3s�)r3s�)r3s��)r3s|)r3s~)r3s�))r2sg`>)r2r�g`>)r2r�gP>)r2��g�?)r2r�g������?)r2�g�?)r2r�r�)r2s<g�?)r2�<g�?)r2r�g�?)r2�{�i�)r2r�i�)r2s�g`�)r2��g`�)r2r�gP�)r2s�g�)r2��g�)r2r�g�)r2s��i��))r2���@)r2��@)r2�u�<�7~)r2���)r2��)r2�u�<�7�)r3r�)r3r�)r3r�)r3r�)r3r�)r3r�)r2sg�g�����@)r�
import_module�floatr%r&r8r'rrr�r5rk�nan_msb_is_signalingrr4r�)r)r��&format_bits_float__cleanRoundtrip_list�le_bitsrJ�be_bits�format_bits__nan_list�
formatcode�bitsr�r9� format_bits_float__rounding_list�%format_bits_float__roundingError_list�+format_bits_float__doubleRoundingError_lists&             r�test_half_float�"UnpackIteratorTest.test_half_floatss���!�/�/��<�	�
��"�!�!���
�%��-�(�
�%��-�(�)�2
�.�A�J�G��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�*=�>�A�!
��!6��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�!6��)�)�)��H��H����T�4�8�8�,��������T�)�8�4����T�D�H�H�9�-��������T�)�8�4�,
�(�,$D��J�a����T�6�;�;�z�#=�>�$D�1
�-� C�M�J����m�V�[�[�*�H�C�

7�7
�3�$O��J�a����T�6�;�;�z�#=�>�$Orr)
r�r�r�r�rr�r�r�r�r�r�r�r�r�s@rruru+s/����
!�*7�3�3�
$�3�n?�n?rru�__main__)rGrzrHr�r.r�rIr�r�r�rr)r
rrCrArBrD)#�collectionsr�	itertoolsrrVr�r5r�rr&rr�rxr�test.supportr�test.support.script_helperr�test.support.testcaserrrrrr�rJrKrrr!rr#rur��mainrrr�<module>r�s����"��	����
�
���&�7�<��m�m�u�$��J�
�
(�
��E�l���E�l��$.�"��%�>�+�X�->�->�>�D v?��*�*�v?�r�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit