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

�Ke_s��V�ddlZddlZddlZddlmZddlmZmZdddddd	d
ddd
eej	��ej	fde
fdde
fde
fde
fde
fde
fgZGd�de��Z
Gd�dej��ZGd�dej��ZGd�de��Zedkrej��dSdS)�N)�support)�VALID_UNDERSCORE_LITERALS�INVALID_UNDERSCORE_LITERALS)�0r)�1�)�9�	)�10�
)�99�c)�100�d)�314�:)z 314r)z314 r)z  		  314  		  rz  1x)z  1  rz  1  �� �  		  uȀc��eZdZdS)�IntSubclassN��__name__�
__module__�__qualname__���7/usr/local/apps/python3/lib/python3.11/test/test_int.pyrrs�������Drrc��eZdZd�Zd�Zejd���Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�ZdS)�IntTestCasesc�$�|�td��d��|�td��d��|�td��d��|�td��d��|�td��d��|�td��d��|�td	��d��|�td
��d��|�td��d��|�td��d��|�td
d��d��tD]_\}}dD]W}dD]R}||z|z}|}|dkr|tur|}	|�t|��|���C#t$rY�OwxYw�X�`t	dt
jz
��}t|��}|�|dzt
j��|�|t��|�t|dd���t
jdz��td��}|�|t��td��}|�|t��dt
jz
}|�|dz	|dz��td��}|�|t��|�ttdd��|�tdd��d��|�tdd��d��|�ttdd��|�ttdd��|�ttdd ��|�ttdd��|�ttd!d��|�ttd!d��|�td"d��d#��|�td$d��d#��|�td%d&��d#��|�td'd(��d#��|�td)d*��d#��|�td+d,��d#��|�td-d ��d#��|�td.d/��d#��|�td0d1��d#��|�td2d3��d#��|�td4d��d#��|�td5d6��d#��|�td7d8��d#��|�td9d:��d#��|�td;d��d#��|�td<d=��d#��|�td>d?��d#��|�td@dA��d#��|�tdBdC��d#��|�tdDdE��d#��|�tdFdG��d#��|�tdHdI��d#��|�tdJdK��d#��|�tdLdM��d#��|�tdNdO��d#��|�tdPdQ��d#��|�tdRdS��d#��|�tdTdU��d#��|�tdVdW��d#��|�tdXdY��d#��|�tdZd[��d#��|�td\d]��d#��|�td^d_��d#��|�td`da��d#��|�tdbdc��d#��|�tddd��d��|�tddd��d��|�tded��d��|�tdd��d��|�tdd��d��|�tdfd��d&��|�tdgd��d��|�tdhd��d��|�tdid��d&��|�tdj��dk��|�tdjd1��dk��|�tdd��d��|�tdd ��d��|�tdfd��d&��|�tdld��d��|�tdmd ��d��|�tdnd��d&��|�ttdod��|�ttdpd��|�ttdqd��|�ttdrd��|�ttdsd ��|�ttdtd ��|�ttdud ��|�ttdvd ��|�ttdwd��|�ttdxd��|�ttdyd��|�ttdzd��|�td{d��d|��|�td}d��d|��|�td~d&��d|��|�tdd(��d|��|�td�d*��d|��|�td�d,��d|��|�td�d ��d|��|�td�d/��d|��|�td�d1��d|��|�td�d3��d|��|�td�d��d|��|�td�d6��d|��|�td�d8��d|��|�td�d:��d|��|�td�d��d|��|�td�d=��d|��|�td�d?��d|��|�td�dA��d|��|�td�dC��d|��|�td�dE��d|��|�td�dG��d|��|�td�dI��d|��|�td�dK��d|��|�td�dM��d|��|�td�dO��d|��|�td�dQ��d|��|�td�dS��d|��|�td�dU��d|��|�td�dW��d|��|�td�dY��d|��|�td�d[��d|��|�td�d]��d|��|�td�d_��d|��|�td�da��d|��|�td�dc��d|��dS)�Nrg��Q�	@�g��Q�	����g333333@g333333�g@g�z-3z -3 u -3 r�)r�+�-)rr�	rr&���rg}Ô%�I�Tg}Ô%�I����X111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111��0o123r�S�0x123i#�0x�0o��0b�!100000000000000000000000000000000l�102002022201221111211�10000000000000000��32244002423141��
1550104015504��211301422354��40000000000�12068657454r
�
4294967296r�
1904440554��	9ba461594�	535a79889�
�	2ca5b7464��	1a20dcd81��	100000000�a7ffda91��704he7g4��4f5aff66��3723ai4g��281d55i4��1fj8b184��1606k7ic��mb994ag��hek2mgl��dnchbnm��b28jpdm��8pfgih4��76beigg��5qmcpqg��4q0jto4��4000000� �3aokq94�!�2qhxjli�"�2br45qb�#�1z141z4�$z 0o123  �000�0b100z	 0O123   z 0X123  z 0B100 �0123�{�0X123�0O123�0B100�0b2�0b02�0B2�0B02�0o8�0o08�0O8�0O08�0xg�0x0g�0Xg�0X0g�!100000000000000000000000000000001l�102002022201221111212�10000000000000001�32244002423142�
1550104015505�211301422355�40000000001�12068657455�
4294967297�
1904440555�	9ba461595�	535a7988a�	2ca5b7465�	1a20dcd82�	100000001�a7ffda92�704he7g5�4f5aff67�3723ai4h�281d55i5�1fj8b185�1606k7id�mb994ah�hek2mgm�dnchbnn�b28jpdn�8pfgih5�76beigh�5qmcpqh�4q0jto5�4000001�3aokq95�2qhxjlj�2br45qc�1z141z5)
�assertEqual�int�L�
ValueError�repr�sys�maxsize�assertIsInstance�assertRaises�	TypeError)�self�s�v�sign�prefix�ss�vv�xs        r�
test_basiczIntTestCases.test_basic#s	������S���3�'�'�'�����T���A�&�&�&�����U���R�(�(�(�����S���1�%�%�%�����T���B�'�'�'�����S���1�%�%�%�����T���B�'�'�'�����T���B�'�'�'�����V���b�)�)�)�����9�:�:�B�?�?�?�����T�"���r�*�*�*��
	�
	�D�A�q�$�	
�	
��7���F��$���*�B��B��s�{�{�q�
�':�':��R����(�(��R���"�5�5�5�5��%�����������	
�
��C�K�� � ����F�F������1��s�{�l�+�+�+����a��%�%�%�����Q�q�r�r�U���S�[��]�3�3�3�
��J�J�����a��%�%�%���K�K�����a��%�%�%�
�s�{�N������a���A��&�&�&��	�N�N�����a��%�%�%�	
���)�S�!�R�0�0�0�����W�a���"�-�-�-�����W�b�)�)�3�/�/�/�	
���*�c�4��4�4�4����*�c�4��3�3�3����*�c�4��3�3�3����*�c�4��3�3�3����*�c�4��3�3�3����*�c�4��3�3�3�	
����@�!�D�D�j�Q�Q�Q�����4�a�8�8�*�E�E�E�����0�!�4�4�j�A�A�A�����-�q�1�1�:�>�>�>�����_�a�0�0�*�=�=�=�����^�Q�/�/��<�<�<�����]�A�.�.�
�;�;�;�����]�A�.�.�
�;�;�;�����\�2�.�.�
�;�;�;�����\�2�.�.�
�;�;�;�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�	
����Z��+�+�R�0�0�0�����Z��+�+�R�0�0�0�����U�A����*�*�*�����W�a���"�-�-�-�����W�a���#�.�.�.�����W�a���!�,�,�,�����[�!�,�,�b�1�1�1�����Z��+�+�S�1�1�1�����Y��*�*�A�.�.�.�	
����V���c�*�*�*�����V�R���#�.�.�.�	
����W�b�)�)�3�/�/�/�����W�a���"�-�-�-�����W�a���!�,�,�,�����W�b�)�)�3�/�/�/�����W�a���"�-�-�-�����W�a���!�,�,�,�	
���*�c�5�!�4�4�4����*�c�6�1�5�5�5����*�c�5�!�4�4�4����*�c�6�1�5�5�5����*�c�5�!�4�4�4����*�c�6�1�5�5�5����*�c�5�!�4�4�4����*�c�6�1�5�5�5����*�c�5�"�5�5�5����*�c�6�2�6�6�6����*�c�5�"�5�5�5����*�c�6�2�6�6�6�	
����@�!�D�D�j�Q�Q�Q�����4�a�8�8�*�E�E�E�����0�!�4�4�j�A�A�A�����-�q�1�1�:�>�>�>�����_�a�0�0�*�=�=�=�����^�Q�/�/��<�<�<�����]�A�.�.�
�;�;�;�����]�A�.�.�
�;�;�;�����\�2�.�.�
�;�;�;�����\�2�.�.�
�;�;�;�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����[�"�-�-�z�:�:�:�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Z��,�,�j�9�9�9�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�����Y��+�+�Z�8�8�8�8�8s�4#G�
G%	�$G%	c
���tD]��t�fd�dD����r�|�t�d��t	�����|�t�d��t��dd��d������tD]@�t�fd�dD����r�|�tt�d���A|�tdd��d	��|�td
��d��|�td��d��|�ttd
��|�ttd��|�ttd��|�ttd��dS)Nc3� �K�|]}|�vV��	dS�Nr��.0�ch�lits  �r�	<genexpr>z0IntTestCases.test_underscores.<locals>.<genexpr>��'�����/�/��2��9�/�/�/�/�/�/rz.eEjJr�_rc3� �K�|]}|�vV��	dSr�rr�s  �rr�z0IntTestCases.test_underscores.<locals>.<genexpr>�r�r�1_00r"r
�0_100rs1_00�_100z+_100�1__00�100_)	r�anyr�r��eval�replacerr�r�)r�r�s @r�test_underscoreszIntTestCases.test_underscores�s����,�	H�	H�C��/�/�/�/�w�/�/�/�/�/�
�����S��a�[�[�$�s�)�)�4�4�4����S��a�[�[�#�c�k�k�#�r�.B�.B�A�*F�*F�G�G�G�G�.�	7�	7�C��/�/�/�/�w�/�/�/�/�/�
�����j�#�s�A�6�6�6�6�����V�Q����+�+�+�����W���s�+�+�+�����W���s�+�+�+����*�c�6�2�2�2����*�c�7�3�3�3����*�c�7�3�3�3����*�c�6�2�2�2�2�2rc��|�td��d��|�td��d��|�td��d��|�td��d��dS)Nrrz-1r(s10s-1)�assertIsr��r�s r�test_small_intszIntTestCases.test_small_ints�sr��	
�
�
�c�$�i�i��$�$�$��
�
�c�$�i�i��$�$�$��
�
�c�%�j�j�"�%�%�%��
�
�c�%�j�j�"�%�%�%�%�%rc�J�|�t��d��dS)Nr�r�r�r�s r�test_no_argszIntTestCases.test_no_args�s"���������"�"�"�"�"rc���|�tdd���d��|�td��5td���ddd��n#1swxYwY|�td��5tdd���ddd��n#1swxYwY|�ttd	���|�ttd
���dS)Nrr)��baser6zkeyword argumentg333333�?)r�)r�r�rr)r�r��assertRaisesRegexr�r�r�s r�test_keyword_argszIntTestCases.test_keyword_args�sY������U��+�+�+�Q�/�/�/�
�
#�
#�I�/A�
B�
B�	�	��#�J�J�J�J�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
#�
#�I�/A�
B�
B�	!�	!��%�a� � � � �	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!����)�S�r��2�2�2����)�S�q��1�1�1�1�1s$�A�A"�%A"�B"�"B&�)B&c�h�|�tdd��d��|�t��5tdd��ddd��n#1swxYwY|�t��5tdd��ddd��n#1swxYwY|�t��5tdd��ddd��n#1swxYwY|�t��5tdddd	zz
�
��ddd��n#1swxYwY|�t��5tddd	z�
��ddd��n#1swxYwYt	dd��D]'}|�td|�
��d���(dS)z9Testing the supported limits of the int() base parameter.rr8rrN�%is���r)��r�)r�r�r�r��range�r�r�s  r�test_int_base_limitsz!IntTestCases.test_int_base_limitss�������S�!���a�(�(�(�
�
�
�z�
*�
*�	�	���Q�K�K�K�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�
�z�
*�
*�	�	���R�L�L�L�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�
�z�
*�
*�	�	���T�N�N�N�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�
�z�
*�
*�	&�	&���!�Q��V�*�%�%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�
�
�
�z�
*�
*�	"�	"���!�S�&�!�!�!�!�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"��!�B�K�K�	5�	5�D����S��4�0�0�0�!�4�4�4�4�	5�	5sY�A�A �#A �B�B"�%B"�C � C$�'C$�D)�)D-�0D-�E/�/E3�6E3c��|�t��5tdd��ddd��n#1swxYwY|�t��5tdd��ddd��dS#1swxYwYdS)z2Not integer types are not valid bases; issue16772.rg@Ng@)r�r�r�r�s r�test_int_base_bad_typesz$IntTestCases.test_int_base_bad_typess���
�
�
�y�
)�
)�	�	���S�M�M�M�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�
�y�
)�
)�	�	���S�M�M�M�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�8�<�<�A;�;A?�A?c���Gd�dt��}ddzddzddfD]D}|�t��5td|��ddd��n#1swxYwY�E|�td|d���	��d
��|�td|d���	��d��|�td|d
���	��d��dS)Nc��eZdZd�Zd�ZdS)�9IntTestCases.test_int_base_indexable.<locals>.MyIndexablec��||_dSr���value)r�r�s  r�__init__zBIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__init__s
��"��
�
�
rc��|jSr�r�r�s r�	__index__zCIntTestCases.test_int_base_indexable.<locals>.MyIndexable.__index__s
���z�!rN)rrrr�r�rrr�MyIndexabler�s2������
#�
#�
#�
"�
"�
"�
"�
"rr�r)rrr��43�101r�r8r�erqi)�objectr�r�r�r�)r�r�r�s   r�test_int_base_indexablez$IntTestCases.test_int_base_indexablesP��	"�	"�	"�	"�	"�&�	"�	"�	"��s�F�Q��V�G�Q��*�	 �	 �D��"�"�:�.�.�
 �
 ��D�$����
 �
 �
 �
 �
 �
 �
 �
 �
 �
 �
 ����
 �
 �
 �
 ��	
����U���Q���8�8�8�!�<�<�<�����U���R���9�9�9�3�?�?�?�����U���R���9�9�9�9�E�E�E�E�Es�A�A	�!A	c����Gd�dt���Gd�dt��}Gd�dt��}tt�fd�||tg}	dd	lm�|��fd
���n#t$rYnwxYw|D�]B}|d��}|�t|����5|�	t|��d��t|tttf��r%|�	t|d
��d��nEd}|�t|��5t|d
��ddd��n#1swxYwY|�td��5t|d����ddd��n#1swxYwYddd��n#1swxYwY��DdS)Nc��eZdZdS)�<IntTestCases.test_non_numeric_input_types.<locals>.CustomStrNrrrr�	CustomStrr�.��������rr�c��eZdZdS)�>IntTestCases.test_non_numeric_input_types.<locals>.CustomBytesNrrrr�CustomBytesr�/r�rr�c��eZdZdS)�BIntTestCases.test_non_numeric_input_types.<locals>.CustomByteArrayNrrrr�CustomByteArrayr�0r�rr�c�>���|�����Sr�)�decode)�br�s �r�<lambda>z;IntTestCases.test_non_numeric_input_types.<locals>.<lambda>5s���i�i����
�
�+�+�rr)�arrayc����d|��S)N�Br)r�rs �rrz;IntTestCases.test_non_numeric_input_types.<locals>.<lambda>?s���u�u�S�!�}�}�rs100rr)r6zcan't convert non-stringzinvalid literalsAAAAAAAAAAAAAAAA)�str�bytes�	bytearray�
memoryviewr�append�ImportError�subTest�typer�r��
isinstancer�r�r�)	r�r�r��	factories�fr��msgr�rs	       @@r�test_non_numeric_input_typesz)IntTestCases.test_non_numeric_input_types+s�����	#�"�"�"�"��"�"�"�&�&�&�&�&�%�&�&�&�.�.�.�.�.�i�.�.�.�
��+�+�+�+����

�	�	6�#�#�#�#�#�#�
���4�4�4�4�5�5�5�5���	�	�	��D�	����
�	(�	(�A���&�	�	�A����d�1�g�g�&�&�	
(�	
(�� � ��Q����-�-�-��a�#�u�i�!8�9�9�"��$�$�S��A�Y�Y��2�2�2�2�4�C��/�/�	�3�?�?�"�"��A�q�	�	�	�"�"�"�"�"�"�"�"�"�"�"����"�"�"�"��+�+�J�8I�J�J�(�(����+���'�'�'�(�(�(�(�(�(�(�(�(�(�(����(�(�(�(�	
(�	
(�	
(�	
(�	
(�	
(�	
(�	
(�	
(�	
(�	
(����	
(�	
(�	
(�	
(��	(�	(sm�A6�6
B�B�8BF?�E�F?�E!�!F?�$E!�%F?�F(�F?�(F,�,F?�/F,�0F?�?G	�G	c�6�|�ttd��dd���d��|�ttd��dd���d��|�ttd��dd���d��|�ttd��dd���d��|�ttd��dd���d��dS)	Ns123rr"rW�123s123 s123As1234)r�r�rr�s r�test_int_memoryviewz IntTestCases.test_int_memoryviewNs�������Z��/�/��!��4�5�5�r�:�:�:�����Z�
�3�3�A�a�C�8�9�9�2�>�>�>�����Z��0�0��1��5�6�6��;�;�;�����Z��0�0��1��5�6�6��;�;�;�����Z��0�0��1��5�6�6��;�;�;�;�;rc�H�|�ttd��dS)Nz1.2)r�r�r�r�s r�test_string_floatzIntTestCases.test_string_floatUs �����*�c�5�1�1�1�1�1rc	������Gd�d��}|�tt|����Gd�dt��}|�tt|����Gd�d��}|�t|����d��Gd�d	��}t|fD�]�}Gd
�d|��}|�t|����d��Gd�d
|��}|�t��5|�t|����d��ddd��n#1swxYwYGd�d|��}|�t��5|�t��5t|����ddd��n#1swxYwYddd��n#1swxYwYt|fD�]Q}	Gd�d|	���G�fd�d|��}
|�t��5|�t|
����d��ddd��n#1swxYwYGd�d|	���G�fd�d|��}|�t��5|�t|
����d��ddd��n#1swxYwYG�fd�d|	���G�fd�d|��}	|�t��5t|����ddd��n#1swxYwY|�d||	f����n:#t$r-}
|�t|
��d��Yd}
~
nd}
~
wwxYwGd�d|	���G�fd �d!|��}|�t��5|�t��5t|����ddd��n#1swxYwYddd��n#1swxYwY��S���dS)"Nc��eZdZdS)�>IntTestCases.test_intconversion.<locals>.ClassicMissingMethodsNrrrr�ClassicMissingMethodsrZ��������Drrc��eZdZdS)�7IntTestCases.test_intconversion.<locals>.MissingMethodsNrrrr�MissingMethodsr^rrrc��eZdZd�ZdS)�-IntTestCases.test_intconversion.<locals>.Foo0c��dS�N�*rr�s r�__int__z5IntTestCases.test_intconversion.<locals>.Foo0.__int__c����rrN�rrrr#rrr�Foo0rb�#������
�
�
�
�
rr&r"c��eZdZdS)�0IntTestCases.test_intconversion.<locals>.ClassicNrrrr�Classicr)hrrr*c��eZdZd�Zd�ZdS)�:IntTestCases.test_intconversion.<locals>.IntOverridesTruncc��dSr!rr�s rr#zBIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__int__l����2rc��dS)Ni�rr�s r�	__trunc__zDIntTestCases.test_intconversion.<locals>.IntOverridesTrunc.__trunc__ns���3rN)rrrr#r0rrr�IntOverridesTruncr,ks2�������������rr1c��eZdZd�ZdS)�2IntTestCases.test_intconversion.<locals>.JustTruncc��dSr!rr�s rr0z<IntTestCases.test_intconversion.<locals>.JustTrunc.__trunc__sr.rN�rrrr0rrr�	JustTruncr3rs#����������rr6c��eZdZd�ZdS)�9IntTestCases.test_intconversion.<locals>.ExceptionalTruncc��ddzdS)Nrrrr�s rr0zCIntTestCases.test_intconversion.<locals>.ExceptionalTrunc.__trunc__ys����E�E�E�ErNr5rrr�ExceptionalTruncr8xs#����������rr:c��eZdZd�ZdS)�.IntTestCases.test_intconversion.<locals>.Indexc��dSr!rr�s rr�z8IntTestCases.test_intconversion.<locals>.Index.__index__����!�rrN�rrrr�rrr�Indexr<��#������"�"�"�"�"rr@c���eZdZ�fd�ZdS)�;IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntc������Sr�r)r�r@s �rr0zEIntTestCases.test_intconversion.<locals>.TruncReturnsNonInt.__trunc__�s���$�u�w�w�rNr5)r@s�r�TruncReturnsNonIntrC�s.�������'�'�'�'�'�'�'rrEc��eZdZd�ZdS)�0IntTestCases.test_intconversion.<locals>.Intablec��dSr!rr�s rr#z8IntTestCases.test_intconversion.<locals>.Intable.__int__�r>rNr%rrr�IntablerG�rArrIc���eZdZ�fd�ZdS)�=IntTestCases.test_intconversion.<locals>.TruncReturnsNonIndexc������Sr�r)r�rIs �rr0zGIntTestCases.test_intconversion.<locals>.TruncReturnsNonIndex.__trunc__�s���&�w�y�y�(rNr5)rIs�r�TruncReturnsNonIndexrK�s.�������)�)�)�)�)�)�)rrMc���eZdZ�fd�ZdS)�4IntTestCases.test_intconversion.<locals>.NonIntegralc������Sr�r�r��NonIntegrals �rr0z>IntTestCases.test_intconversion.<locals>.NonIntegral.__trunc__�s���*�{�}�}�,rNr5�rRs�rrRrO�s.�������-�-�-�-�-�-�-rrRc���eZdZ�fd�ZdS)�@IntTestCases.test_intconversion.<locals>.TruncReturnsNonIntegralc������Sr�rrQs �rr0zJIntTestCases.test_intconversion.<locals>.TruncReturnsNonIntegral.__trunc__�s���*�{�}�}�,rNr5rSs�r�TruncReturnsNonIntegralrU�s.�������-�-�-�-�-�-�-rrWzFailed to raise TypeError with z2__trunc__ returned non-Integral (type NonIntegral)c��eZdZd�ZdS)�/IntTestCases.test_intconversion.<locals>.BadIntc��dS�NgE@rr�s rr#z7IntTestCases.test_intconversion.<locals>.BadInt.__int__�s��#�trNr%rrr�BadIntrY�s#������$�$�$�$�$rr\c���eZdZ�fd�ZdS)�;IntTestCases.test_intconversion.<locals>.TruncReturnsBadIntc������Sr�r�r�r\s �rr0zEIntTestCases.test_intconversion.<locals>.TruncReturnsBadInt.__trunc__�s���%�v�x�x�rNr5�r\s�r�TruncReturnsBadIntr^�s.�������(�(�(�(�(�(�(rrb)
r�r�r�r�r��assertWarns�DeprecationWarning�ZeroDivisionError�failr)r�rrr&r*r�r1r6r:�trunc_result_baserErMrW�erbr\r@rIrRs               @@@@r�test_intconversionzIntTestCases.test_intconversionXsG������	�	�	�	�	�	�	�	����)�S�*?�*?�*A�*A�B�B�B�	�	�	�	�	�V�	�	�	����)�S�.�.�*:�*:�;�;�;�	�	�	�	�	�	�	�	�	
����T�T�V�V���b�)�)�)�	�	�	�	�	�	�	�	��W�%�H	.�H	.�D�
�
�
�
�
�D�
�
�
�

���S�!2�!2�!4�!4�5�5�r�:�:�:�
�
�
�
�
�D�
�
�
��!�!�"4�5�5�
7�
7�� � ��Y�Y�[�[�!1�!1�2�6�6�6�
7�
7�
7�
7�
7�
7�
7�
7�
7�
7�
7����
7�
7�
7�
7�
�
�
�
�
�4�
�
�
��"�"�#4�5�5�
(�
(��!�!�"4�5�5�
(�
(��$�$�&�&�'�'�'�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(�'-�g�%6�3
.�3
.�!�"�"�"�"�"�-�"�"�"�'�'�'�'�'�'�'��'�'�'��%�%�&8�9�9�D�D��$�$�S�);�);�)=�)=�%>�%>��C�C�C�D�D�D�D�D�D�D�D�D�D�D����D�D�D�D�"�"�"�"�"�/�"�"�"�)�)�)�)�)�)�)�4�)�)�)��%�%�&8�9�9�D�D��$�$�S�);�);�)=�)=�%>�%>��C�C�C�D�D�D�D�D�D�D�D�D�D�D����D�D�D�D�-�-�-�-�-�-�-�"3�-�-�-�
-�-�-�-�-�-�-�d�-�-�-�	<��)�)�*<�=�=�7�7��3�3�5�5�6�6�6�7�7�7�7�7�7�7�7�7�7�7����7�7�7�7��I�I�I� $�&7�8�8�;�<�<�<�<��!�=�=�=��$�$�S��V�V�'<�=�=�=�=�=�=�=�=�����=����$�$�$�$�$�.�$�$�$�(�(�(�(�(�(�(��(�(�(��&�&�y�1�1�.�.��%�%�&8�9�9�.�.��*�*�,�,�-�-�-�.�.�.�.�.�.�.�.�.�.�.����.�.�.�.�.�.�.�.�.�.�.�.�.�.�.����.�.�.�.��c3
.�+H	.�H	.s��),E!�!E%	�(E%	�G*�/G�G*�G�G*�G�G*�*G.	�1G.	�9,I1�1I5�8I5�4,K,�,K0�3K0�M<�2M�
M<�M�M<�M�M<�<
N3�#N.�.N3�.Q�	P-	�!Q�-P1
�1Q�4P1
�5Q�Q�Qc�0�Gd�dt��}Gd�dt��}|d��}|�|d��|�t|��d��|�t|����d��dS)Nc��eZdZd�ZdS)�:IntTestCases.test_int_subclass_with_index.<locals>.MyIndexc��dSr!rr�s rr�zDIntTestCases.test_int_subclass_with_index.<locals>.MyIndex.__index__�r$rNr?rrr�MyIndexrl�r'rrnc��eZdZd�ZdS)�;IntTestCases.test_int_subclass_with_index.<locals>.BadIndexc��dSr[rr�s rr�zEIntTestCases.test_int_subclass_with_index.<locals>.BadIndex.__index__�����trNr?rrr�BadIndexrp��#������
�
�
�
�
rrsr<r)r�r�)r�rnrs�my_ints    r�test_int_subclass_with_indexz)IntTestCases.test_int_subclass_with_index�s���	�	�	�	�	�c�	�	�	�	�	�	�	�	�s�	�	�	������������#�#�#�����V���a�(�(�(�����X�X�Z�Z���!�,�,�,�,�,rc�^�Gd�dt��}Gd�dt��}|d��}|�|d��|�t|��d��|d��}|�|d��|�tt|��dS)Nc��eZdZd�ZdS)�6IntTestCases.test_int_subclass_with_int.<locals>.MyIntc��dSr!rr�s rr#z>IntTestCases.test_int_subclass_with_int.<locals>.MyInt.__int__�r$rNr%rrr�MyIntry�r'rr{c��eZdZd�ZdS)�7IntTestCases.test_int_subclass_with_int.<locals>.BadIntc��dSr[rr�s rr#z?IntTestCases.test_int_subclass_with_int.<locals>.BadInt.__int__�rrrNr%rrrr\r}�rtrr\r<r")r�r�r�r�)r�r{r\rus    r�test_int_subclass_with_intz'IntTestCases.test_int_subclass_with_int�s���	�	�	�	�	�C�	�	�	�	�	�	�	�	�S�	�	�	���q���������#�#�#�����V���b�)�)�)������������#�#�#����)�S�&�1�1�1�1�1rc��	�
�Gd�d���	Gd�dt��}Gd�d���
Gd�dt��}G�	fd	�d
��}G�
fd�d��}Gd
�d��}�	��}|�t��5t|��}ddd��n#1swxYwY|�|d��|�t|��t��|��}t|��}|�|d��|�t|��t���
��}|�t��5t|��}ddd��n#1swxYwY|�|d��|�t|��t��|��}|�t��5t|��}ddd��n#1swxYwY|�|d��|�t|��t��|��}|�t��5t|��}ddd��n#1swxYwY|�|d��|�t|��t��|��}|�t��5|�tt|��ddd��n#1swxYwY|��}|�t��5t|��}ddd��n#1swxYwY|�|d��|�t|��t��|�t��5t|��}ddd��n#1swxYwY|�|d��|�t|��t��dS)Nc��eZdZd�ZdS)�<IntTestCases.test_int_returns_int_subclass.<locals>.BadIndexc��dS�NTrr�s rr�zFIntTestCases.test_int_returns_int_subclass.<locals>.BadIndex.__index__�rrrNr?rrrrsr��rtrrsc��eZdZd�ZdS)�=IntTestCases.test_int_returns_int_subclass.<locals>.BadIndex2c��dSr�rr�s rr�zGIntTestCases.test_int_returns_int_subclass.<locals>.BadIndex2.__index__�rrrNr?rrr�	BadIndex2r��rtrr�c��eZdZd�ZdS)�:IntTestCases.test_int_returns_int_subclass.<locals>.BadIntc��dSr�rr�s rr#zBIntTestCases.test_int_returns_int_subclass.<locals>.BadInt.__int__�rrrNr%rrrr\r��rtrr\c��eZdZd�ZdS)�;IntTestCases.test_int_returns_int_subclass.<locals>.BadInt2c��dSr�rr�s rr#zCIntTestCases.test_int_returns_int_subclass.<locals>.BadInt2.__int__�rrrNr%rrr�BadInt2r��rtrr�c���eZdZ�fd�ZdS)�HIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIndexc������Sr�r)r�rss �rr0zRIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIndex.__trunc__�s����x�z�z�!rNr5)rss�r�TruncReturnsBadIndexr��s.�������
"�
"�
"�
"�
"�
"�
"rr�c���eZdZ�fd�ZdS)�FIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadIntc������Sr�rr`s �rr0zPIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsBadInt.__trunc__�s����v�x�x�rNr5ras�rrbr��s.�������
 �
 �
 �
 �
 �
 �
 rrbc��eZdZd�ZdS)�KIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclassc��dSr�rr�s rr0zUIntTestCases.test_int_returns_int_subclass.<locals>.TruncReturnsIntSubclass.__trunc__�rrrNr5rrr�TruncReturnsIntSubclassr��rtrr�rr)	r�rcrdr�r�rr�r�r)r�r�r�r�rbr��bad_int�n�good_intrsr\s         @@r�test_int_returns_int_subclassz*IntTestCases.test_int_returns_int_subclass�s1����	�	�	�	�	�	�	�	�	�	�	�	�	��	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�c�	�	�	�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	�	�	�	�	�	�	�	��(�*�*��
�
�
�0�
1�
1�	�	��G���A�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����A�����
�
�d�1�g�g�s�#�#�#��)�+�+����L�L������A�����
�
�d�1�g�g�s�#�#�#��&�(�(��
�
�
�0�
1�
1�	�	��G���A�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����A�����
�
�d�1�g�g�s�#�#�#��'�)�)��
�
�
�0�
1�
1�	�	��G���A�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����A�����
�
�d�1�g�g�s�#�#�#�&�&�(�(��
�
�
�0�
1�
1�	�	��G���A�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����A�����
�
�d�1�g�g�s�#�#�#�$�$�&�&��
�
�
�0�
1�
1�	7�	7����i��g�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�+�*�,�,��
�
�
�0�
1�
1�	�	��H�
�
�A�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�����A�����
�
�d�1�g�g�s�#�#�#�
�
�
�0�
1�
1�	&�	&��H�%�%�A�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�����A�����
�
�d�1�g�g�{�+�+�+�+�+s~�B.�.B2�5B2�2F�F�F�;H�H�H�J � J$�'J$�
"L;�;L?�L?�*N�N
�
N
�)P�P	�P	c�n��d�fd�	}|d��|d��|d��|d��|dd��|dd��|dd	��|d
d��|d
d	��|d��|dd��|d��|dd��|d
��|d
d��dS)Nc� ����td|�d|�d����5}|�t|��nt||��ddd��n#1swxYwY��|jjdd|�dn||fz��dS)Nzint(z, �))rrz*invalid literal for int() with base %d: %rr)r�r�r�r��	exception�args)r�r��cmr�s   �r�checkz.IntTestCases.test_error_message.<locals>.checks�����"�"�:�:�89���4�4�4�'@�#�B�B�
!�EG��<���F�F�F�F���4�L�L�L�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!�
!����
!�
!�
!�
!�
���R�\�.�q�1�<��|����q�1�2�
3�
3�
3�
3�
3s�#A�A�A�½u123½z  123 456  z123rz123 245rQr$z123245rs123�u123�r�r)r�r�s` r�test_error_messagezIntTestCases.test_error_messages&���		3�		3�		3�		3�		3�		3�	��f�
�
�
�
��i����
��m����
��i����
��i�����
��m�R� � � �
��m�R� � � �
��l�B����
��l�B����
��j����
��j�"����
��j����
��j�"����
��k����
��k�2�����rc�&�|�tdd��d��|�tdd��d��|�tdd��d	��|�td
d��d��dS)
N�=1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1_0_1r)iUUUU�1_2_3_4_5_6_7_0_1_2_3r1iSp�S�1_2_3_4_5_6_7_8_9r$l�g�F�
1_2_3_4_5_6_7rii�2Dr�r�s r�test_issue31619zIntTestCases.test_issue31619=s�������\�^_�`�`�:�	<�	<�	<�����4�a�8�8�-�H�H�H�����0�"�5�5�{�C�C�C�����_�b�1�1�:�>�>�>�>�>rN)rrrr�r�r�cpython_onlyr�r�r�r�r�r�rrrrirvrr�r�r�rrrr r !s4������u9�u9�u9�n3�3�3�&
��&�&���&�#�#�#�2�2�2�5�5�5�"���F�F�F�"!(�!(�!(�F<�<�<�2�2�2�Z.�Z.�Z.�x
-�
-�
-�2�2�2�"F,�F,�F,�P���B?�?�?�?�?rr c�p��eZdZeZ�fd�Z�fd�Zd�Zd�Zdd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Z�xZS)�IntStrDigitLimitsTestsc���t�����tj��|_tjd��dS)Ni)�super�setUpr��get_int_max_str_digits�_previous_limit�set_int_max_str_digits�r��	__class__s �rr�zIntStrDigitLimitsTests.setUpIs<���
���
�
����"�9�;�;����"�4�(�(�(�(�(rc�z��tj|j��t�����dSr�)r�r�r�r��tearDownr�s �rr�zIntStrDigitLimitsTests.tearDownNs3����"�4�#7�8�8�8�
���������rc���|�tj��d��|�tj��d��t	jd��5|�tj��d��|�ddz��}t|��ddd��n#1swxYwY|�tj��d��dS)Nri Nr)	�
assertGreaterr�r��
assertLessr�adjust_int_max_str_digitsr��	int_classr)r��is  r�test_disabled_limitz*IntStrDigitLimitsTests.test_disabled_limitRs
�����3�5�7�7��;�;�;�����2�4�4�f�=�=�=�
�
.�q�
1�
1�	�	����S�7�9�9�1�=�=�=����s�V�|�,�,�A���F�F�F�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	
���3�5�7�7��;�;�;�;�;s�#AB>�>C�Cc	�J�|j}tj��}|d|z��|dd|zz��|d|zdz��|dd|zz��|dd|zz��|�t	td|dz
z����|��dS)z&Ignore the +/- sign and space padding.rrr%r&rrN)r�r�r�r��lenr)r�r��	maxdigitss   r�test_max_str_digits_edge_casesz5IntStrDigitLimitsTests.test_max_str_digits_edge_cases[s����N�	��.�0�0�	��	�#�	�/�"�"�"��	�#��i��'�(�(�(��	�#�	�/�C�'�(�(�(��	�#��i��'�(�(�(��	�#��i��'�(�(�(�����S��	�A�
�!6�7�7�8�8�)�D�D�D�D�DrNc���|�t��5|�|�|��n|�||��ddd��dS#1swxYwYdSr�)r�r�r�)r�r�r�s   rr�zIntStrDigitLimitsTests.checkgs���
�
�
�z�
*�
*�	(�	(��|����q�!�!�!�!����q�$�'�'�'�		(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	(�	(s�/A�A�Ac��tj��}|�d|dzz��|�dd|dzzz��|�d|dzzdz��|�dd|dzzz��|�dd|dzzz��|�d|dzz��d|z}|�t��5t|��ddd��dS#1swxYwYdS)Nrrrr%r&r)r�r�r�r�r�r)r�r�r�s   r�test_max_str_digitsz*IntStrDigitLimitsTests.test_max_str_digitsnsR���.�0�0�	��
�
�3�)�a�-�(�)�)�)��
�
�3��	�A�
�.�.�/�/�/��
�
�3�)�a�-�(�3�.�/�/�/��
�
�3��	�A�
�.�.�/�/�/��
�
�3��	�A�
�.�.�/�/�/��
�
�3�)�a�-�(�)�)�)��)�O��
�
�
�z�
*�
*�	�	���F�F�F�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�!C>�>D�Dc��tj��}|dks
J|���tj}|��dkrtj}tdddz��d���}d}t
j|��5|��}t|��}d	d	d	��n#1swxYwY|��|z
}|�	t|��|��|d
krtjd|�d����t
jtd
|z����5|�
t��5}|��}t|��d	d	d	��n#1swxYwY|��|z
}	d	d	d	��n#1swxYwY|�dt|j����|�|	|dz��tdddz��d���}
|�
t��5}|��}t|
��d	d	d	��n#1swxYwY|��|z
}|�dt|j����|�||dz��d	S)�?Regression test: ensure we fail before performing O(N**2) work.iP�rr/�ci�r$r�i�1N��?�"slow" conversion took only �	 seconds.gףp=
��?�
conversionr)i �)r�r��time�process_time�	monotonicr�rr�rr�r��unittest�SkipTestr�r��assertInr��assertLessEqualr�)r�r��get_time�huge_int�digits�start�huge_decimal�seconds_to_convert�err�seconds_to_fail_huge�extra_huge_int�seconds_to_fail_extra_huges            r�+test_denial_of_service_prevented_int_to_strzBIntStrDigitLimitsTests.test_denial_of_service_prevented_int_to_str|s����.�0�0�	��6�!�!�!�9�!�!�!��$���8�:�:��?�?��~�H��(�C��J�(�(�r�2�2�2����
�
.�v�
6�
6�	)�	)��H�J�J�E��x�=�=�L�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�&�X�Z�Z�%�/������\�*�*�F�3�3�3���$�$��#�%E�'9�%E�%E�%E�F�F�
F�
�
.�s�4�&�=�/A�/A�
B�
B�	6�	6��"�"�:�.�.�
�#� ��
�
���H�
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�$,�8�:�:��#5� �		6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�
	
�
�
�l�C��
�$6�$6�7�7�7����1�3E�a�3G�H�H�H��/�#�g�+�/�/�b�9�9�9��
�
�
�z�
*�
*�	 �c��H�J�J�E������	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �&.�X�Z�Z�%�%7�"��
�
�l�C��
�$6�$6�7�7�7����2�4F�q�4H�I�I�I�I�IsZ�7B�B!�$B!�E?�5E�E?�E	�E?�"E	�#E?�?F�F�<H"�"H&�)H&c�R�tj��}|dks
J|���tj}|��dkrtj}d}d|z}tj|��5|��}t|��ddd��n#1swxYwY|��|z
}|dkrtj	d|�d����tj|d	z
��5|�
t��5}|��}t|��ddd��n#1swxYwY|��|z
}ddd��n#1swxYwY|�d
t|j����|�||dz��dd
z}	|�
t��5}|��}t|	��ddd��n#1swxYwY|��|z
}
|�d
t|j����|�|
|dz��dS)r�順riD
�8Nr�r�r�rr�r)�7i�O)r�r�r�r�r�rr�r�r�r�r�r�r�rr�r�)r�r�r�r��huger�r�r�r��
extra_huger�s           r�+test_denial_of_service_prevented_str_to_intzBIntStrDigitLimitsTests.test_denial_of_service_prevented_str_to_int�s7���.�0�0�	��7�"�"�"�I�"�"�"��$���8�:�:��?�?��~�H����6�z��
�
.�v�
6�
6�	�	��H�J�J�E���I�I�I�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�&�X�Z�Z�%�/����$�$��#�%E�'9�%E�%E�%E�F�F�
F��
.�v��z�
:�
:�	6�	6��"�"�:�.�.�
�#� ��
�
���D�	�	�	�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�$,�8�:�:��#5� �		6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�
	
�
�
�l�C��
�$6�$6�7�7�7����1�3E�a�3G�H�H�H���]�
�
�
�
�z�
*�
*�	�c��H�J�J�E��
�O�O�O�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�&.�X�Z�Z�%�%7�"��
�
�l�C��
�$6�$6�7�7�7����7�9K�A�9M�N�N�N�N�NsZ�%B�B�B�D=�3D�
D=�D	�D=� D	�!D=�=E�E�(G�G�Gc��tj��}dD]m}|�|���5|�d|dzz|��|dksJ�|�ddz|��ddd��n#1swxYwY�ndS)z-The limit does not apply to power of 2 bases.)r)r6r1r$rir�rrr�N)r�r�r
r�)r�r�r�s   r�!test_power_of_two_bases_unlimitedz8IntStrDigitLimitsTests.test_power_of_two_bases_unlimited�s����.�0�0�	�%�	4�	4�D����4��(�(�
4�
4����s�i�!�m�4�d�;�;�;� �7�*�*�*�*����s�W�}�d�3�3�3�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4�
4����
4�
4�
4�
4��	4�	4s�>A8�8A<	�?A<	c��tj��}|dz}d|z}d|z}|�|��|�|��|�|�d���|�|�d���dS)Nr"�111�1_11�_111)r�r�r�r�)r�r��triplesr��s_s     r�test_underscores_ignoredz/IntStrDigitLimitsTests.test_underscores_ignored�s����.�0�0�	��q�.���G�O��
�g�
�����q�������r�����
�
�a�9�9�9�����
�
�b�;�;�;�����rc���|j}tj��}d|z}||��}|d|����}||ksJ�|d|����}||ksJ�t|��t|��dS)N�5r%r&)r�r�r�r)r�r��
max_digitsr�r��pos_i�neg_is       r�test_sign_not_countedz,IntStrDigitLimitsTests.test_sign_not_counted�s����N�	��/�1�1�
��*����I�a�L�L���	�'�a�'�'�"�"���E�z�z�z�z��	�'�a�'�'�"�"���v�������E�
�
�
��E�
�
�
�
�
rc��|j}tj��}d|z}|||��}|dkrB|�t��5t|��ddd��n#1swxYwYn|dkrt|��|�t��5}||�d�|��ddd��dS#1swxYwYdS)N�2rr)r�r�r�r�r�r)r�r�r�r�r�r�r�s       r�_other_base_helperz)IntStrDigitLimitsTests._other_base_helper�sQ���N�	��/�1�1�
��*����I�a������"�9�9��"�"�:�.�.�
�
��A����
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��
�B�Y�Y���F�F�F�
�
�
�z�
*�
*�	%�c��I��g�g�g�t�$�$�$�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%�	%�	%s$�A(�(A,�/A,�#C�C�Cc��d}|�|���5|�|��ddd��n#1swxYwYd}|�|���5|�|��ddd��dS#1swxYwYdS)Nr"r�rq)r
r�r�s  r�test_int_from_other_basesz0IntStrDigitLimitsTests.test_int_from_other_bases�s����
�\�\�t�\�
$�
$�	*�	*��#�#�D�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*���
�\�\�t�\�
$�
$�	*�	*��#�#�D�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�	*�	*s�;�?�?�B�B�Br�)rrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r��
__classcell__)r�s@rr�r�Es��������I�)�)�)�)�)�
�����<�<�<�
E�
E�
E�(�(�(�(����)J�)J�)J�V&O�&O�&O�P4�4�4�	 �	 �	 �
�
�
�%�%�%�*�*�*�*�*�*�*rr�c��eZdZeZdS)�IntSubclassStrDigitLimitsTestsN)rrrrr�rrrr�r�s�������I�I�Irr��__main__)r�r�r��testr�test.test_grammarrrr�r�r�r�r�r�TestCaser r�r�r�mainrrr�<module>rs���
�
�
�
���������������<�<�<�<�<�<�<�<�	���������$�	
��c�k�	�	�C�K�(�	����	�Z� �	�Z��	�j��	�Z� �	�:��%��*	�	�	�	�	�#�	�	�	�a?�a?�a?�a?�a?�8�$�a?�a?�a?�H~*�~*�~*�~*�~*�X�.�~*�~*�~*�B�����%;�����z����H�M�O�O�O�O�O��r