403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.144
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/test_capi/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_capi/__pycache__/test_long.cpython-315.opt-2.pyc
R
>lqjُc��]PHs]PHs]PHGs]QHGs\O
Q2s\O
Q2sPsQQ\	2s
QQ2sQQ	2sQ
Q\O2s\Q6Xc\O 2P!P!)
�)�
import_helper�	_testcapi�_testlimitedcapic��\sQs]sQsP!)�IntSubclass�)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��-C:\Python315\\Lib\test\test_capi\test_long.pyrrs��r
rc�.`�\sQs]snQsQsQsUsP!)�Indexc��VmP!�N��value)�selfrs&&r�__init__�Index.__init__s���
r
c��UO!rr�rs&r�	__index__�Index.__index__s���z�z�r
r)rr	r
rrrr�__classdictcell__��
__classdict__s@rrrs������r
rc�.`�\sQs]snQsQsQsUsP!)�
MyIndexAndIntc��]
!)�
rrs&rr�MyIndexAndInt.__index__���r
c��]!)�rrs&r�__int__�MyIndexAndInt.__int__r$r
r)rr	r
rrr'rrrs@rr r s������r
r c�`�\sQs] snQsQsQsQsQsQs	Qs
QsQ	P	Q
P
Q\-Qks
Q
sQsQsQsQsQsQsQsQsQsQsQsQsQsQsQsQs\O@Q3QQ5Q 2s!Q!s"Q"s#Q#s$Q$s%Q%s&Q&s'Q's(Q(s)Q)s*Q*s+Q+s,Q,s-Q-s.Q.s/\0Ob\OdQ/2Q02s3Q1s4Q2s5Us6P!)4�	LongTestsc	��.Q[]B22lQ[]B22lQ[]B22lQ[]B22lQ[]22lQ[]22lFDVoUOUQ59^tt^2[OU2vq#U%cUO	V2PPP2JX	P!)%fhJm9h)c3�@�SF �Do]U*w�	J	P!3h��r��.0�ns& r�	<genexpr>�)LongTests.test_compact.<locals>.<genexpr>%s��I���I�q�a��d�d�I���c3�B�SF �Do]U*'w�	J	P!3hr-rr/s& rr2r3&s��Y���Y��q�!�t�e�Y���c3�N�SF �Do]U*]*
w�	J	P!3hr-rr/s& rr2r3's��	���	�1�a��d�Q�h�h�	�s�%c3�P�SF �Do]U*']*w�	J	P!3hr-rr/s& rr2r3(s������A�q�!�t�e�a�i�i��s�&c3�@�SF �Do]%U*w�	J	P!3h��%rr/s& rr2r3*s��Y���Y��b�!�e�e�Y�r4c3�B�SF �Do]%U*'w�	J	P!3hr:rr/s& rr2r3+s��i���i��r�1�u�f�i�r6)r1)�range�subTestr�call_long_compact_api�assertEqual)rr1�
is_compactrs&   r�test_compact�LongTests.test_compact"s���	
�
&�E�"�I�
&�	
�(�U�2�Y�
'�	
�+��b�	�
*�		
�
,��r��
+�	
�(�U�2�Y�
'�	
�)�e�B�i�
(�	
�A������"�"�$-�$C�$C�A�$F�!�
���$�$�Q�.�#�"�	
�#�"�"�s�C	�(C	�C
�C
c�L�UO[OP2Q2UO[O]2Q2UO[OQ2Q2UO[O[O2Q2P!)��)T���)Tr)TrF)FrG)r@rr?�sys�maxsizers&r�test_compact_known�LongTests.test_compact_known2sw��	
����8�8��<�j�I�����8�8��;�Y�G�����8�8��=�{�K�����8�8����E�$�	&r
c��[OoUOU]22UOUQ22UOUP22UOUP	22UOU[]222UO	UQ22UO	U[222P!�rEl�
~��l!]c��?)r�pylong_check�
assertTruer�assertFalse�object�r�checks& r�test_long_check�LongTests.test_long_check;s��� �-�-������a��!�����<�=�>�����b�	�"�����d��$�����k�!�n�-�.�����s��$�����v�x��)r
c��[OoUOU]22UOUQ22UOUP22UOUP	22UOU[	]222UOUQ22UOU[222P!rM)r�pylong_checkexactrPrQrrRrSs& r�test_long_checkexact�LongTests.test_long_checkexactGs��� �2�2������a��!�����<�=�>�����b�	�"�����t��%�����{�1�~�.�/�����s��$�����v�x��)r
c
���[Oo[OOoQQQQQ	QQ
V"'1	FDGoUOUQ59^tt^2UO
UU2[U22PPP2JI	UO[U[Q22UO[U[Q22UO[U[Q22P!)%fhJ�9h)g@gffffff@g������@gr�infz-inf�nangffffff�g�������g�)r�pylong_fromdoublerH�
float_info�maxr>r@�int�assertRaises�
OverflowError�float�
ValueError)r�
fromdouble�	float_maxrs&   r�test_long_fromdouble�LongTests.test_long_fromdoubleSs���%�7�7�
��N�N�&�&�	��3��T�4��d�I�z�R�E����E��*�*�� � ��E�!2�C��J�?�+�*�S�	
���-��U�5�\�B����-��U�6�]�C����*�j�%��,�?�	+�*�*�s�"C%	�%C6
�.C6
c�&�[Oo[2oUU2oU[2oUO	U[
2UO
U]2UO	U[
2UOU]2UOV42P!)r)	r�pylong_fromvoidptrrR�NULL�assertIsInstancera�assertGreaterEqualr@�assertNotEqual)r�fromvoidptr�obj�x�ys&    r�test_long_fromvoidptr�LongTests.test_long_fromvoidptr^sv��&�9�9���h�������������a��%�����1�%����a��%�����A�����A�!r
c�8�[OoUOUQ]
2Q2UOUQ]2Q
2UOUQ]$2Q2UOUQ]2Q2UOUQ]2Q2UO[UQ]2UOUQ]
2Q2UOUQ]
2Q2UOUQ]
2Q2UO[UQ]
2UO[UQ]
2UO[UQ]2UO[UQP2UO[UQ]%2UO[UQ	O2]2UO[UQ	O2]2UOUQ
]2Q2UOUQ]2Q2UOUQ
]2Q2UOUQ]2Q2P!)s123scafesxyzs0xcafes-123s -123 s1_23s- 123r
�١٢٣٤٥٦٧٨٩٠s123s123456)�{�)���)�ry)rz�)���r{)r~r})rxr{)�#ry)r�pylong_fromstringr@rbre�encode)r�
fromstrings& r�test_long_fromstring�LongTests.test_long_fromstringjs���%�7�7�
�����F�B�/��:�����G�R�0�+�>�����F�B�/��<�����F�A�.��9�����I�q�1�;�?����*�j�'�1�=�����G�R�0�)�<�����I�r�2�I�>�����G�R�0�(�;����*�j�(�B�?����*�j�#�r�:����*�j�&�!�<����*�j�&�"�=����*�j�&�"�=����*�j�2H�2O�2O�2Q�ST�U����*�j�2H�2O�2O�2Q�SU�V�����J��2�H�=�����M�1�5�x�@�����J��3�Z�@�����M�2�6�
�Cr
c��[OoUOUQ]
2]{2UOUQ]2Q2UOUQ]$2Q2UOUQ]2]{2UOUQ]2Q2UO[UQ]2UOUQ]
2Q2UOUQ]
2Q2UOUQ]
2]{2UO[UQ	]
2UO[UP]
2UO[UQ]2UO[UQP2UO[UQ]%2UOUQ
]2Q2UOUQ
]2Q2UO[UQ
]2UO[UQ]2UO[UQ
]2UO[UQ]2P!)�123�caferz�xyzr|�0xcafez-123z -123 �1_23z- 123rwi��Il�x�hHz123z123456r~)r�pylong_fromunicodeobjectr@rbre)r�fromunicodeobjects& r�test_long_fromunicodeobject�%LongTests.test_long_fromunicodeobject�s���%�>�>�����*�5�"�5�s�;����*�6�2�6��?����*�5�"�5�u�=����*�5�!�4�c�:����*�8�Q�7��@����*�&7���C����*�6�2�6��=����*�8�R�8�$�?����*�6�2�6��<����*�&7��"�E����*�&7��R�@����*�&7���B����*�&7���C����*�&7���C����*�+A�1�E�z�R����*�+A�2�F��U����*�&7��A�F����*�&7��q�I����*�&7��B�G����*�&7��r�Jr
�	use_index�mask�negative_value_errorc��]]QQU1oU]6cUPQQ	U1*
oSFD�oUOUQ59^tt^2UOUU2U2UOU[U22U2U%c"UOU[U22U2PPP2J�	U%c"UOU[	22]
2L?UO[U[]*22UO[U[	22U%c~UOUU]*
2U2UOUU]*2U2UOUPQ*2]2UOU]Q*2]2LmUOVaU]*
2UOVaPQ*2UO[V]*2UO[U]Q*2UO[UQ2UO[UQ2UO[UQ2UO[U[2P!)%fhCJZ9h)
r���r��rN�2�3����i.���)
r>r@rrr rb�	TypeErrorrc�SystemErrorrl)	r�func�min_val�max_valr�r�r��valuesrs	&&&&$$$  r�check_long_asint�LongTests.check_long_asint�s���
�Q��T�7�+���Q�;��r�4���0�0�F��E����E��*�*�� � ��e��e�4�� � ��k�%�&8�!9�5�A���$�$�T�%��,�%7��?�	+�*������T�-�/�2�B�7����i��u�R�y�9����i��}��?�����T�'�A�+�.��8����T�'�A�+�.��8����T�"��*�-�q�1����T�!�t�)�_�a�0����2�'�A�+�F����2�"��*�E����m�T�Q�;�?����m�T�1��9�=����)�T�3�/����)�T�4�0����)�T�3�/����+�t�T�2�3+�*�*�s�AI(	�?!I(	�(I:
�1I:
c�n�V#P]]Q1FD�oUOUQ59^tt^2UOUU2U]12UOU[U22U]12UOU[U22U]12PPP2J�	UOU[	22Q2UOUU]*
2Q2UOUU]*2Q2UO[UP2UO[UQ2P!)%fhCJ*9h)rEr�rrN)r"r)rGrG)rGrE)r>r@rrr rbr�r�)rr�r�r�rs&&&& r�check_long_asintandoverflow�%LongTests.check_long_asintandoverflow�s�����A�q�$�7�E����E��*�*�� � ��e��u�a�j�9�� � ��k�%�&8�!9�E�1�:�F�� � ��e�E�l�!3�e�Q�Z�@�+�*�8�	
����m�o�.��8�����g��k�*�H�5�����g��k�*�H�5����+�t�T�2����)�T�3�/�+�*�*�s�A!D"	�"D4
�+D4
c�\�[Oo]QH
GoGoUOVU2P!)r)�INT_MIN�INT_MAX)r�PyLong_AsIntrr�r�r�)rr�r�r�s&   r�test_long_asint�LongTests.test_long_asint�s ��'�4�4��.����l�W�=r
c�\�[Oo]QH
GoGoUOVU2P!�r)�LONG_MIN�LONG_MAX)r�
pylong_aslongrr�r�r�)r�aslongr�r�s&   r�test_long_aslong�LongTests.test_long_aslong�s ��!�/�/��0����f��9r
c�\�[Oo]QH
GoGoUOVU2P!r�)r�pylong_aslongandoverflowrr�r�r�)r�aslongandoverflowr�r�s&   r�test_long_aslongandoverflow�%LongTests.test_long_aslongandoverflow�s"��,�E�E��0��(�(�):�h�Or
c�^�[Oo]QH
GoUO	U]UP
Q5P!)r��	ULONG_MAX�r�)r�pylong_asunsignedlongrr�r�)r�asunsignedlongr�s&  r�test_long_asunsignedlong�"LongTests.test_long_asunsignedlong�s,��)�?�?��'����n�a��05�	�	7r
c�^�[Oo]QH
GoUO	U]UP	Q5P!)rr��r�)r�pylong_asunsignedlongmaskrr�r�)r�asunsignedlongmaskr�s&  r�test_long_asunsignedlongmask�&LongTests.test_long_asunsignedlongmask�s)��-�G�G��'����0�!�Y�T��Jr
c�\�[Oo]QH
GoGoUOVU2P!�r)�	LLONG_MIN�	LLONG_MAX)r�pylong_aslonglongrr�r�r�)r�
aslonglongr�r�s&   r�test_long_aslonglong�LongTests.test_long_aslonglong�s ��%�7�7�
�2����j�Y�?r
c�\�[Oo]QH
GoGoUOVU2P!r�)r�pylong_aslonglongandoverflowrr�r�r�)r�aslonglongandoverflowr�r�s&   r�test_long_aslonglongandoverflow�)LongTests.test_long_aslonglongandoverflow�s"�� 0� M� M��2��(�(�)>�9�Ur
c�^�[Oo]QH
GoUO	U]UP
Q5P!)r��
ULLONG_MAXr�)r�pylong_asunsignedlonglongrr�r�)r�asunsignedlonglongr�s&  r�test_long_asunsignedlonglong�&LongTests.test_long_asunsignedlonglongs)��-�G�G��(����0�!�Z�5��Qr
c�^�[Oo]QH
GoUO	U]UP	Q5P!)rr�r�)r�pylong_asunsignedlonglongmaskrr�r�)r�asunsignedlonglongmaskr�s&  r� test_long_asunsignedlonglongmask�*LongTests.test_long_asunsignedlonglongmask
s)��!1�!O�!O��(����4�a��$��Or
c�`�[Oo]QH
GoGoUOVUP
Q5P!)r)�PY_SSIZE_T_MIN�PY_SSIZE_T_MAXr�)r�pylong_as_ssize_trr�r�r�)r�
as_ssize_tr�r�s&   r�test_long_as_ssize_t�LongTests.test_long_as_ssize_ts*��%�7�7�
�<����j�.�(-�	�	/r
c�^�[Oo]QH
GoUO	U]UP
Q5P!)r)�SIZE_MAXr�)r�pylong_as_size_trr�r�)r�	as_size_tr�s&  r�test_long_as_size_t�LongTests.test_long_as_size_ts'��$�5�5�	�&����i��H���Fr
c
�r�[Oo[[OO
2oU'UP]]Q1FDcoUO
UQ59^tt^2UOUU2[U22UOUU2[2PPP2Je	UOU[]*22Q2UO[U[]*22UO[U[22UO[U]U*2UO[UQU*2UO[UQ2UO[UQ2UO[UQ2UO[ U["2P!)%fhCJw9h)rEr�rgE@rNr�r����)r�pylong_asdoublerarHr_r`r>r@rdrmrrbr�rr rcr�rl)r�asdouble�MAXrs&   r�test_long_asdouble�LongTests.test_long_asdoublesD��#�3�3���#�.�.�$�$�%���d�C��Q��4�0�E����E��*�*�� � ��%��%��,�?��%�%�h�u�o�u�=�+�*�1�
	
����+�b�/�2�D�9����)�X�u�R�y�9����)�X�}��?����-��1�s�7�;����-��2��8�<����)�X�s�3����)�X�t�4����)�X�s�3����+�x��6�+�*�*�s�>F$	�$F6
�-F6
c��[Oo[Oo[2oUU2oU[2oUOUU2U2UOUU2[2UOU[
U22U2][O]**oVF]*6�cUOUVF*
2U2VV]*6�c#UOUVV*
2[2UO[U[U22UO[U[22UO[U]Q*2UO[U]Q*'2P!)rEr�)
rrk�pylong_asvoidptrrRrl�assertIsrr�
SIZEOF_VOID_Prbr�rrc)rrp�	asvoidptrrqrrrs�Ms&      r�test_long_asvoidptr�LongTests.test_long_asvoidptr1s��&�9�9��$�5�5�	��h�����������
�
�i��l�C�(��
�
�i��l�D�)��
�
�i��A��/��5��)�)�)�A�-�
-���1��9��M�M�)�A�E�*�C�0��1��9��M�M�)�A�E�*�D�1����)�Y��a��9����)�Y���9����-��A�t�G�<����-��Q��W�H�=r
c��]QHGo]U*o]U]*
*'o]U]*
*]*
oUOVU2P!)r)�SIZEOF_PID_T)rr�r�)r�aspidr��bits�	PID_T_MIN�	PID_T_MAXs&&    r�_test_long_aspid�LongTests._test_long_aspidIs?��*��<�����a��[�L�	���Q��K�!�O�	����e�	�:r
c�F�UO[O2P!r)rr�pylong_aspidrs&r�test_long_aspid�LongTests.test_long_aspidQs�����i�4�4�5r
c�F�UO[O2P!r)rrrrs&r�test_long_aspid_limited�!LongTests.test_long_aspid_limitedTs�����.�;�;�<r
gffffff�?)�memusec���[Oo]U*o[U]*]*]
*2oUV4]P2oUOVQ]*]*2UOUO	]2[U22UV4[U2P2oUOVQ]*]*2UOUO	]2[U2]*
2P!)rE)r�pylong_asnativebytes�	bytearrayr@�count�len)r�size�
asnativebytes�v�buffer�rs&&    r�test_long_asnativebytes_huge�&LongTests.test_long_asnativebytes_hugeWs���!�6�6�
�
��I���4�!�8�r�>�B�.�/���!�Q��+������A�I��M�*�������a��#�f�+�6��!�S��[�"�5������A�I��M�*�������a��#�f�+��/�:r
c�
�]PHo]QHGoGo[	UOUO
U]*2UO
]2*2]*2o]U]*]*
*]*
o]U]**]*
o[O%c[QUQUQ
QUQ
02]U1QU1QU1VT1Vd]*1U'U1U'U]*1]]�*]*
] 1]]�*]*
'] 1]]�*]!1]]�*']!1]Q*]*
]!1]Q*]*
']!1]Q*]!1]Q*']!11FD�vqxUOQUQ	
029^tt^2[Q
2o	UOV�Vy]P2Q2UOU	Q
Q2UOV�[U2U	]]2Q
2UOU	Q
Q2PPP2J�	[Q2o	UO]U]U	]]2Q2UOU	Q2UO]U]U	]]2Q2UOU	Q2,Q MQ!M]Q"[]U21MQ#M]Q$[]U21MQ%M]*Q&[]U21MQ'MPQ([]U21MQ*MQ)Q+[]U21MQ,MQ-MQ.M]�Q/[]U21MQ0MQ1MQ2MQ3M]]�*]*
Q4] 1M]]�*]*
'Q5] 1M]]�*]*
'Q6] 1M]]�*]*
'Q7] 1M]Q*]*
Q8]!1M]Q*]*
Q9]!1M]Q*]*
'Q:]!1M]Q*]*
'Q;]!1M]Q*]*
'Q<]!1M]]�*'Q=] 1M]]�*'Q>]!1MQ?MFD�vqzoUOUQ	
Q[U
2Q029^tt^2[U
2o[QU*2o	U
PPP/*o
UOV�VyU]2QUQ02UOV�PUQ2UOV�VyU]2QUQ02UOV�PUQ2PPP2J�	Q@Q-QAQ1]Q*]*
Q8] 1]Q*]*
Q9]!11FD�vqzoUOUQ	
Q[U
2Q029^tt^2[U
2o[QU*2o	UOV�VyU]2QUQ02UOV�VyU]2QUQ02PPP2J�	UO!["29^tt^2UPU	]]2PPP2UO![$29^tt^2U[]2U	]P2PPP2UO![$29^tt^2U[]2U	]]2PPP2UO![$29^tt^2UQU	]P2PPP2P!)%fhCJ�9h)%fhCJ�9h)%fhCJ�9h)%fhK�9h)%fhK�9h)%fhK�9h)%fhP!9h)Br�rr�zSIZEOF_SIZE=z
MAX_SSIZE=�016Xz
MAX_USIZE=r�rFzsizeof-�X�Zz)PyLong_AsNativeBytes(v, <unknown>, 0, -1)z/buffer overwritten when it should not have beenz0PyLong_AsNativeBytes(Index(v), <unknown>, 0, -1)z5PyLong_AsNativeBytes(v, <3 byte buffer>, 2, 0)  // BEs�z5PyLong_AsNativeBytes(v, <3 byte buffer>, 2, 1)  // LEs��-�bytes��z PyLong_AsNativeBytes(v, buffer, �, <big>)z<big>�, <little>)z<little>zbytes-unsigned�, <big|unsigned>)z, <little|unsigned>)znot a numberr�s���)r�rE)rsr.s)rE�rEs)�*�*rEs*)rG��rEs
��������������)r&��rEs�����������)�r%r.)r(��r.)rFsr.s�)����	)r*s	�r,)���r+�)r-s	��r,s �������������������������������s �s!��s"���s ��������������������������������s!��������������������������������s s!�s"��s �s!��)i@�s�@r{)r(r%rE)r*r+r.)�mathrrr�ra�ceil�log�support�verbose�printr>rr@r�minrrbrer�)rr/rr��SZ�	MAX_SSIZE�	MAX_USIZEr�expectr�	expect_be�expect_nr1�	expect_les&             r�test_long_asnativebytes�!LongTests.test_long_asnativebytescsP���	
�����4�8�8�H�q�L�1�D�H�H�Q�K�?�@�1�D�
E���"�q�&�1�*�%��)�	��"�q�&�M�A�%�	��?�?�?��L���M�y�$�&7�}�)�T�9J�K�L���G�
�"�I�
�2�J�
�O�
�Q����Z����Z��a�� �
��V�A�X�r�N��#�v�a�x�[�"��
��V�R�L��#�v�Y��O�
��V�A�X�r�N��#�v�a�x�[�"��
��V�R�L��#�v�Y��O�
�I�A�"�����!�u�o�.�.�"�7�+��� � ���q�!�R�)H�?�A�� � ���E�G�� � ���u�Q�x���F�)S�F�H�� � ���E�G�/�.�#
�>�9�%������M�!�V�Q��:�C�	E������1�����M�!�V�Q��:�C�	E������1�2'
�2�2'
�2�2'
����A�r�
�;�2'
�
3�	2'
�
�.��B���<�2'
�
3�
2'
��.��B���<�2'
�
3�2'
����B���<�2'
�
3�2'
��.��B���<�2'
�
3�2'
�
3�2'
� 
3�!2'
�"�-��A�r�
�;�#2'
�&
3�'2'
�(
6�)2'
�,
3�-2'
�.
6�/2'
�2��V�A�X�2�B�G�32'
�4�#�v�a�x�[�<�B�G�52'
�8�#�v�a�x�[�@�B�G�92'
�:�#�v�a�x�[�D�b�I�;2'
�D��V�A�X�L�B�G�E2'
�F��V�A�X�2�B�G�G2'
�H�#�v�a�x�[�2�B�G�I2'
�J�#�v�a�x�[�<�B�G�K2'
�L�#�v�a�x�[�@�B�G�M2'
�T�#�v�Y�2�B�G�U2'
�V�#�v�Y�6�B�G�W2'
�b
2�c2'
�"�A�(�f����1��Q�s�9�~�&6�e�<�=�=��	�N��#�7�1�9�-��%�d��d�O�	�� � ��=��A�q�+I�6�q�c��B�D�� � ��2�A�J��@�� � ��=��A�q�+I�6�q�c��E�G�� � ��2�A�J�
�C�>�=�g2'
�H
3�2�2�5�
��V�A�X���3�
��V�A�X�.��3�'
�"�A�(�����1��Q�s�9�~�&6�n�E�F�F��	�N��"�7�1�9�-��� � ��=��A�q�+I�6�q�c�9J�K�M�� � ��=��A�q�+I�6�q�c�9M�N�P�G�F�'
�,�
�
�z�
*�
*��"�f�a��+�+��
�
�y�
)�
)��%��(�F�A�r�2�*�
�
�
�y�
)�
)��%��(�F�A�q�1�*��
�
�y�
)�
)��.�&�!�R�8�*�
)�/�.�.��Z>�=�=��:G�F�F��+�
*��*�
)��
)�
)��*�
)�
)�s��4A0W>	�
BX	�AX(	�X=�4Y�.Y#�(Y6�>X
�X
�X%
�X%
�(X:
�1X:
�=Y
	�Y
	�Y 	�Y 	�#Y3	�,Y3	�6Z	�?Z	c���]PHo]QHGo]QHGoGo[
UOUOU]*2UO]2*2]*2oU2o[Q2o[Q2FCD�oUO]Q2o	[UO]Q2,[U	]*
2Tt,tFDp�OQ2MJ	toN2o
U
PPP/*o[OUQ2oVY19q�U
]*]�*%cVY]*1o
U	1oUV�]P2oUOV�2UV�[U2]2oUOV�2UO!V�U	'P2UV�[U2]2oUOV�2UO!V�PU	2UV�U	]2oUOV�U
O#22UV�U	]2oUOV�U
O#22CJ�	P!ttoh[$c�oPO'[)[+S]Q5TTt,tFDvooSQ
S]*%cPLQ	0MJ 	Lttoohtoo22O-Q	2o[.O0%c0[32[3S	Q
2[3QS2[3QS2g[%Q
S02SgPo=hh9h)r)�Randomr�r�rF�little)�start�02X�_rzhex =zint =z	Value: 0x)r/�randomr@rrr�rar0r1rr=�	randranger�
from_bytes�assertInrr@�hex�AssertionError�join�reversed�	enumerate�stripr2r3r4)rr/r@rr�r6�rngrrEr1�bytes_be�bytes_ler�expect_1�expect_2�actual�ex�i�b�	value_hexs&                   r�test_long_asnativebytes_fuzz�&LongTests.test_long_asnativebytes_fuzz
s����!�	
�����4�8�8�H�q�L�1�D�H�H�Q�K�?�@�1�D�
E���h���3����t���A��
�
�a��%�A���
�
�a��%��/4�A��E�l�;�l��-�-��$�l�;���H�
 ��"��~�H����x��2�A�#%�'�)�H���{�T�!�!��A��;���4��
F�&�q�!�R�8���
�
�f�/�&�q�#�f�+�q�A���
�
�f�/�� � ��1�"�#�;�7�&�q�#�f�+�q�A���
�
�f�/�� � ��"�1�:�6�&�q�!�Q�7���
�
�f�����?�&�q�!�Q�7���
�
�f�����?�E��
<��<"�
F��G�G�H� )�(�!� <�.� <���1���g�A��E�E�b�s�3�4� <��.�%���E�#�J���?�?�?��G��!�W�%��'�9�-��'�1�%��$�y���%<�=�2�E��
F�s=�?H�,C H�	K#�"K#�#K�I)�
I)�(7K� >K�K#c
��]PHo]QHGoGo[	UOUO
U]*2UO
]2*2]*2o]U]*]*
*]*
o]U]**]*
oQFCD+vqxo	UOUQU	Q
Q[U2Q029^tt^2[U2o
UPPP/*oUOV�Vz]]2QU
Q02UOV�V�]]2QU
Q02UOV�Vz]]2QU
Q02UOV�V�]]2QU
Q02V{6Xc=UOV�VzP]2QU
Q	02UOV�VzP]2QU
Q	02UOV�Vz]]2QU
Q
02PPP2CJ.	P!)%fhCJD9h)r)�pylong_fromnativebytesr�rrrzPyLong_FromNativeBytes(buffer, rrz'PyLong_FromUnsignedNativeBytes(buffer, z, <native>)r ))r!rr)r"rErE)r%rGr()r)r(r()s��rGi��)
r/rr]r�rar0r1r>rr@)rr/�fromnativebytesr�r6r7r8�v_be�expect_s�expect_ur1�v_les&           r�test_long_fromnativebytes�#LongTests.test_long_fromnativebytesIs����	
�����4�8�8�H�q�L�1�D�H�H�Q�K�?�@�1�D�
E���"�q�&�1�*�%��)�	��"�q�&�M�A�%�	�)
�$�D�H�����
�!�H�Q�<�q��T���5�I�J�J���I���D�b�D�z��� � ��?�4�A�q�+I�5�a�S��A�C�� � ��?�4�A�q�+I�5�a�S��D�F�� � ��?�4�A�q�+I�=�a�S��I�K�� � ��?�4�A�q�+I�=�a�S��L�N�
�<��$�$�X��t��A�/N�9�!��K�H�J��$�$�X��t��A�/N�A�!��K�P�R�
� � ��?�4�A�q�+I�5�a�S�8I�J�L�/K�J�)
�K�J�J�s�BG	�AG	�G
�G
c��[OoUOU]2]2UOUQ2]2UOUQ2P2UOU]2]2UOUP	2]2UOU[Q22P2UOUP
2]2UO	[
UQ2UO	[
U[
]{22P!)rEi@�rNr�i����)r�pylong_getsignr@rrbr�r)r�getsigns& r�test_long_getsign�LongTests.test_long_getsignvs����*�*��������Q�'�������!�,�������b�)�������Q�'��������*������S�!1�2�B�7��������+����)�W�c�2����)�W�e�C�j�9r
c��[OoUOU]2]2UOU]{2]2UOUP2]2UOU]2]2UOUP	2]2UOUP
2]2UOU[P22]2UO	[
UQ2UO	[
U[
]{22P!�rErN)r�pylong_ispositiver@rrbr�r)r�
ispositives& r�test_long_ispositive�LongTests.test_long_ispositive������0�0�
�����A���*�����C��!�,�����B���+�����A���*�����D�)�1�-�����E�*�A�.�����K��O�4�a�8����)�Z��5����)�Z��s��<r
c��[OoUOU]2]2UOU]{2]2UOUP2]2UOU]2]2UOUP	2]2UOUP
2]2UOU[P22]2UO	[
UQ2UO	[
U[
]{22P!rk)r�pylong_isnegativer@rrbr�r)r�
isnegatives& r�test_long_isnegative�LongTests.test_long_isnegative�rpr
c�
�[OoUOU]2]2UOUP2]2UOU]2]2UOUP	2]2UOUP
2]2UOU[P22]2UOU[]22]2UO	[
UQ2UO	[
U[
]{22P!rk)r�
pylong_iszeror@rrbr�r)r�iszeros& r�test_long_iszero�LongTests.test_long_iszero�s����(�(��������A�&�������Q�'�������A�&�������q�)��������*������B��0�!�4������A��/��3����)�V�S�1����)�V�U�3�Z�8r
c�\�[Oo]QH
GoGoUOVU2P!)r)�	INT32_MIN�	INT32_MAX)r�pylong_asint32rr|r}r�)r�to_int32r|r}s&   r�test_long_asint32�LongTests.test_long_asint32�� ��#�2�2��2����h�9�=r
c�\�[Oo]QH
GoGoUOVU2P!)r)�	INT64_MIN�	INT64_MAX)r�pylong_asint64rr�r�r�)r�as_int64r�r�s&   r�test_long_asint64�LongTests.test_long_asint64�r�r
c�f�[Oo]QH
GoUO	U]U[
Q5P!)r)�
UINT32_MAX�r�)r�pylong_asuint32rr�r�re)r�	as_uint32r�s&  r�test_long_asuint32�LongTests.test_long_asuint32��,��$�4�4�	�(����i��J�3=�	�	?r
c�f�[Oo]QH
GoUO	U]U[
Q5P!)r)�
UINT64_MAXr�)r�pylong_asuint64rr�r�re)r�	as_uint64r�s&  r�test_long_asuint64�LongTests.test_long_asuint64�r�r
c	���[Oo[O2oQUOQUO
QPQ[OQ6XcPL]-oUOV#2P!)�bits_per_digit�
digit_size�digits_order�digit_endiannessrB)rH�int_infor�get_pylong_layoutr��sizeof_digit�	byteorderr@)rr��layout�expecteds&   r�test_long_layout�LongTests.test_long_layout�s]���<�<���,�,�.���h�5�5��(�/�/��B��c�m�m�x�&?��Q�	
��	
����*r
c��[O2o]UQ**o[OoUOU]2]2UOU]{2]{2UOUQ2Q2UOU[	]{22]{2UOUU]
*]*]*2],QN12UOUU]
*]*]*'2],QN12UOU[	U]
*]*]*22],QN12UO[UQ2UO[UQ2UO[UQ2P!)r.r�rNy�?�abcr~)rErrrrrrrrrr.)rr��
pylong_exportr@rrbr�)rr��baser�s&   r�test_long_export�LongTests.test_long_export�sL���,�,�.���F�+�,�,��!�/�/�
�	
����q�)�1�-�����s�+�S�1�����t�,�d�3�����{�3�'7�8�#�>�	
����t�R�x�!�|�a�'7�8��>�?�	A������r��A���)9�':�;��>�?�	A�����{�4��8�a�<�!�3C�'D�E��>�?�	A�	
���)�]�C�8����)�]�D�9����)�]�E�:r
c
�v`�[O2o]UQ**n[OoUO[U],2UO[UQ,2UOU]],2]2UOU]]{,2]{2UOU]]{,2Q2UOU]]],2R]*]*'2UOU],QN2R]*]*R]**]*2R]*
oUOU]V3U,2R]*U*RU**U*2UOU],Q	N2]{2Q
FD3oUO
U[U]62[U2],2U2J5	U1Qko[Oo,[]]
2NQMQM]]d*M]]d*]*
MoUOQ[U222SFD�oUOUQ59^tt^2UU2o[U[2%cUvq�L!So[!U]62o	U[U22o
UOUV�2UV�12PPP2J�	P!)%fhJ�9h)r.r�c�d:�,o[UR2vqUOU2U%cJ*U!)T)�divmod�append)�num�digits�digitr�s&  �r�	to_digits�3LongTests.test_longwriter_create.<locals>.to_digits
s2����F��#�C��.�
���
�
�e�$��s���Mr
i90l�>[=c3�2�SF �Dp'w�	J
	P!3hrr)r0r�s& rr2�3LongTests.test_longwriter_create.<locals>.<genexpr>s��}���}��t�}�s�)r�r~)rEr.ry)rxrr)r�rrE�r#�d)rr��pylongwriter_createrbrer@r��bool�absr�r=�extend�listr>�
isinstance�tuplera)
rr�r��	max_digitr�r�r��numbers�data�negativer�rr�s
&           @r�test_longwriter_create� LongTests.test_longwriter_create�st����,�,�.���F�+�,�,��'�;�;�����*�&9�1�b�A����*�&9�4��D����,�Q���4�a�8����,�Q���6��<����,�Q���6��=����,�Q��A��7��!�8�a�<��	*����,�Q�	�:��q��1��t�a�x�/�!�3�	5��1�H�	����,�Q��y�0Q�R��q��9�,�t�i�/?�?�)�K�	M�	
���,�Q��<�c�B�*�C��M�M�-�d�3��7�m�c�#�h��]�K��
�*�	�"�/�/�
�F�E�!�R�L�F�%�F��F�Q��V�F�Q��V�A�X�F�����5�t�G�}�5�5��C����#��&�&�$�S�)���d�E�*�*�'+�$�H�f� �E�"�5�1�9�~�H�&�s�5�z�2�F�� � �!4�X�!F��"*�!3�5�'�&��&�&�&�s�:J'	�AJ'	�'J8
�0J8
zneed a debug build (Py_DEBUG)c���[OoUO[29^tt^2oU2PPP2UO	[WO2Q2P!)%fhK79h)Nz-PyLongWriter_Finish: digit 2 is uninitialized)r�pylongwriter_finish_bugrbr�r@�str�	exception)rr��cms&  r�test_longwriter_finish� LongTests.test_longwriter_finish&sT��#,�"C�"C��
�
�
�{�
+�
+�r�#�%�,�����R�\�\�*�H�	J�,�
+�s�A&�&A6	�/A6	c�D�[O]29^tt^2[QQQ**]
2[O	2[QQQ**Q*]
2[O	2PPP2P!)%fhP!9h)rr�0iXr�)r2�adjust_int_max_str_digitsrar�test_immortal_small_intsrs&r�test_bug_143050�LongTests.test_bug_1430500sg��
�
.�
.�q�
1�
1�
��c�D�j� �"�%��.�.�0���c�D�j� �5�(�"�-��.�.�0�2�
1�
1�
1�s�A$B�B	�B	rl)7rr	r
rrBrJrUrYrhrtr�r�rcr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr2�
bigmemtestrr=rZrcrhrnrtryr�r�r�r�r�r�r��unittest�
skipUnless�Py_DEBUGr�r�rrrs@rr*r* sO����/� &�	*�	*�	@�
"�D�<K�<"3�#'�"3�#�"3�/<�"3�H
0�>�:�P�7�K�@�V�R�P�/�G�7�(>�0;�6�=�
����d�+�	;�,�	;�e9�N=F�~+L�Z:� =�=�9�>�>�?�?�
+�;�225�h����)�)�+J�K�J�L�J�1�1r
r*�__main__)r�rH�test.supportr2r�
import_modulerrrlrarrr �TestCaser*r�mainrr
r�<module>r�s����
��&�
�'�'��4�	� �.�.�/A�B����	�#�	�����X1��!�!�X1�v�z���M�M�O�r

Youez - 2016 - github.com/yon3zu
LinuXploit