Sindbad~EG File Manager

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

�

'ΜgD�����dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZmZddlmZ	ddlZd�Zd�ZGd�d	e�ZGd
�de�ZGd�d
�ZGd�d�ZGd�dej8ej:ej<e
j>�Z Gd�de
j>�Z!e"dk(re
jF�yy#e$rdZY��wxYw)z� Test script for the Unicode implementation.

Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

�N)�warnings_helper)�support�string_tests)�assert_python_failurec�P�dd�}dd�}dd�}dd�}|dk(r||ddfS|dk(r||ddfSy)Nc��y�N�*���input�errorss  �./usr/local/lib/python3.12/test/test_unicode.py�decode1z search_function.<locals>.decode1����c��yr	rrs  r�encode1z search_function.<locals>.encode1 rrc��y�N)r
r
rrs  r�encode2z search_function.<locals>.encode2"���rc��yrrrs  r�decode2z search_function.<locals>.decode2$rr�
test.unicode1�
test.unicode2)�strictr)�encodingrrrrs     r�search_functionrsG�������� ���$��-�-�	�?�	"���$��-�-�rc�>�|j�j�S)z�
    Try to get a fresh clone of the specified text:
    new object with a reference count of 1.

    This is a best-effort: latin1 single letters and the empty
    string ('') are singletons and cannot be cloned.
    )�encode�decode)�texts r�duplicate_stringr$-s���;�;�=���!�!rc��eZdZy)�StrSubclassN��__name__�
__module__�__qualname__rrrr&r&7���rr&c��eZdZy)�OtherStrSubclassNr'rrrr-r-:r+rr-c��eZdZd�Zd�Zy)�WithStrc��||_y�N��value��selfr3s  r�__init__zWithStr.__init__>�	����
rc��|jSr1r2�r5s r�__str__zWithStr.__str__@����z�z�rN�r(r)r*r6r:rrrr/r/=����rr/c��eZdZd�Zd�Zy)�WithReprc��||_yr1r2r4s  rr6zWithRepr.__init__Dr7rc��|jSr1r2r9s r�__repr__zWithRepr.__repr__Fr;rN�r(r)r*r6rBrrrr?r?Cr=rr?c���eZdZeZd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zej8ej<dkDd�d��Zd�Z e!jDd��Z#d�Z$d�Z%d�Z&�fd�Z'�fd �Z(�fd!�Z)�fd"�Z*e!jVd#�d$��Z,�fd%�Z-�fd&�Z.�fd'�Z/d(�Z0�fd)�Z1d*�Z2d+�Z3e!jDe!jh�ej8e5d,ud-�d.����Z6d/�Z7d0�Z8d1�Z9d2�Z:d3�Z;d4�Z<�fd5�Z=d6�Z>d7�Z?ej�ej<d8k(d9�e!jDd:���ZAd;�ZBd<�ZCd=�ZDd>�ZEd?�ZFd@�ZGdA�ZHdB�ZIdC�ZJdD�ZKdE�ZLdF�ZMe!jDej8e5d,ud-�dG���ZNdH�ZOdI�ZPe!j�dJdKdL�dM��ZRdN�ZSdO�ZTdP�ZUdQ�ZVdR�ZWdS�ZXdT�ZYdU�ZZdV�Z[dW�Z\dX�Z]dY�Z^dZ�Z_d[�Z`d\�Zad]�Zbd^�Zcd_�Zdd`�Zeda�Zfdb�Zgdc�Zhdd�Ziej8ej<dkDxsejj�de�dfk7dg�dh��Zle!jDdi��Zmdj�Zndk�Zodl�Zpdm�Zqe!jDe!jh�ej8e5d,ud-�dn����Zrdo�Zsdp�Ztdq�Zu�xZvS)r�UnicodeTestc�~�tjt�|jtjt�yr1)�codecs�registerr�
addCleanup�
unregisterr9s r�setUpzUnicodeTest.setUpPs"������(�����)�)�?�;rc�8�t||�}||�}|j||�|jt|�t|�u�||urNGd�dt�}||�}t||�}||�}|j||�|j||u�yy)Nc��eZdZd�Zy)�)UnicodeTest.checkequalnofix.<locals>.usubc�2�dtj|�zS)Nzusub(%r))�strrBr9s rrBz2UnicodeTest.checkequalnofix.<locals>.usub.__repr__^s��%����T�(:�:�:rN�r(r)r*rBrrr�usubrN]s��;rrR)�getattr�assertEqual�
assertTrue�typerP)r5�result�object�
methodname�args�method�
realresultrRs        r�checkequalnofixzUnicodeTest.checkequalnofixTs������,���T�]�
�����V�,�����Z�(�D��L�8�9����
;�s�
;��&�\�F��V�Z�0�F����J����Z��0��O�O�F�*�4�5� rc�p�|jt|�t|��|j||�yr1)�assertIsrVrT)r5�actual�expecteds   r�assertTypedEqualzUnicodeTest.assertTypedEqualfs(���
�
�d�6�l�D��N�3������*rc��|jdd�|jdd�|jttd�|jttd�|jttddz�|j	dd�y)	N�ÿ�￿z'\Ufffffffe'z'\Uffffffff'z'\U%08x'�z\u0020� )rT�assertRaises�SyntaxError�eval�assertNotEqualr9s r�
test_literalszUnicodeTest.test_literalsjso�������*�����<�0����+�t�->�?����+�t�->�?����+�t�]�X�-E�F����I�s�+rc
��|jtd�d�|jtd�d�|jtd�d�|jtd�d�|jtd	�d
�|jtd�d�|jtd
�d�|jtd�d�|jtd�d�|jtd�d�|jtd�d�|jtd�d�|jtd�d�d}tdjtttd����}|j||�|jtd�td��|j
td�d�|j
ttd��d�|j
ttd��d�|j
tttd���td��|j
ttd ��d!�|j
tttd ���d!�|jtttd"��y)#N�abc�'abc'�ab\c�'ab\\c'�ab\�'ab\\'�\c�'\\c'�\�'\\'�
�'\n'�
�'\r'�	�'\t'��'\x08'�'"�'\'"'�'�"'"�"�'"'a�'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'����0𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀𐀀￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿￿�🐍z'\U0001f40d'�<abc>�<🐍>z<\U0001f40d>�	byte-repr)rT�ascii�join�map�chr�rangerbr&r?rh�	TypeError�r5�
latin1repr�testreprs   r�
test_asciizUnicodeTest.test_asciiss ������u��w�/�����w���5�����v��
�3�����u��y�1�����t��h�/�����t��g�.�����t��g�.�����t��g�.�����t��i�0�����u��|�4�����u��|�4�����s��Y�/�����s��Y�/�

�	������S�%��*�!5�6�7������:�.�����B�C�!�"E�F�	H�	
���e�L�1�?�C����e�K��$6�7��A����e�H�W�$5�6��@����e�H�[��-A�$B�C�[�QX�EY�Z����e�H�^�$<�=��O����e�H�[��-H�$I�J�O�\����)�U�H�\�,B�Crc
���|jtd�d�|jtd�d�|jtd�d�|jtd�d�|jtd	�d
�|jtd�d�|jtd
�d�|jtd�d�|jtd�d�|jtd�d�|jtd�d�|jtd�d�|jtd�d�d}tdjtttd����}|j||�|jtd�td��|j
td�d�|j
ttd��d�|j
ttd��d�|j
tttd���td��|j
ttd ��d �|j
tttd ���td ��|jtttd!��y)"Nrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rr�r�r�r�r�r�u%'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'r�r�r�r�u'🐍'r�r�r�)rT�reprr�r�r�r�rbr&r?rhr�r�s   r�	test_reprzUnicodeTest.test_repr�s&������e��g�.�����g���4�����f��z�2�����e��i�0�����d��X�.�����d��W�-�����d��W�-�����d��W�-�����d��Y�/�����e��l�3�����e��l�3�����c��I�.�����c��I�.�

�	������C��s�� 4�5�6������:�.�����A�B� �!D�E�	G�	
���d�<�0�.�A����d�;�u�#5�6��@����d�8�G�#4�5�w�?����d�8�K��,@�#A�B�K�PW�DX�Y����d�8�N�#;�<�n�M����d�8�K��,G�#H�I�;�We�Kf�g����)�T�8�L�+A�Brc��dj�}|jt|�d�|jt|�d�|jt|�d�|jtt|�y)N�	ᄑ∢㌳uᄑu∢u㌳)�__iter__rT�nextrh�
StopIteration)r5�its  r�test_iteratorszUnicodeTest.test_iterators�s^��
!�
*�
*�
,������b��8�,�����b��8�,�����b��8�,����-��r�2rc���ttd��ttd��g}|D]3}|j|��5|jt|�ddd��5y#1swY�@xYw)Nrnu🚀)�cls)rV�iter�subTestrhr�)r5�casesr�s   r�test_iterators_invocationz%UnicodeTest.test_iterators_invocation�sU���d�5�k�"�D��f��$6�7���C����#��&��!�!�)�S�1�'�&��&�&�s�A"�"A+	c
��gd�}|D]G}|j|��5|j|djt|���ddd��Iy#1swY�TxYw)N�rnu🚀🚀🚀r�)�stringr�)r�rTr�r�)r5r��cases   r�test_iterationzUnicodeTest.test_iteration�sK��=���D����T��*�� � ��r�w�w�t�D�z�':�;�+�*��*�*�s�+A�A	c���gd�}|D]N}|j|��5t|�}t|�|jtt
|�ddd��Py#1swY�[xYw)Nr��r�)r�r��tuplerhr�r�)r5r�r��iterators    r�test_exhausted_iteratorz#UnicodeTest.test_exhausted_iterator�sP��=���D����4��(���:���h���!�!�-��x�@�)�(��(�(�s�2A�A"	c��gd�}|D]�}|j|��5ttjdz�D]r}t	|�}|j|��5djtjtj||���}|j||�ddd��t	ddd���y#1swY��xYw#1swY��xYw)Nr�r��)�protor�)	r�r��pickle�HIGHEST_PROTOCOLr�r��loads�dumpsrT)r5r�r�r�r��pickleds      r�test_pickle_iteratorz UnicodeTest.test_pickle_iterator�s���=���D����4��(�"�6�#:�#:�Q�#>�?�E��d��B����E��2�"$�'�'�&�,�,�v�|�|�B��7N�*O�"P���(�(��w�7�3�2�@�)�(��3�2��)�(�s$�=C�AB:	�$
C�:C
�?C�C	c���tjj|�|jdddd�|jdddd�|jdddd�|jdddd�|jdddd�|jddddd�|jddddd	�|jd
ddddd�|jdddddd	�|j	dddd�|j	dd
dd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�|j	dddd�Gd�dt
�}|j	d|d�dd�y)N��aaa�count�ar�br����i������
uĂaaaaaaaaaau􀌄aaaaaaaaaau􀌄ĂĂĂĂĂĂĂĂĂĂ�Ă�
aaaaaaaaaa�􀌄uĂĂĂĂĂĂĂĂĂĂuĂa_a_a_a_a_a_a_a_a_a_�a_u􀌄a_a_a_a_a_a_a_a_a_a_u"􀌄Ă_Ă_Ă_Ă_Ă_Ă_Ă_Ă_Ă_Ă_�Ă_�aĂ�a􀌄�Ă􀌄c��eZdZy)�%UnicodeTest.test_count.<locals>.MyStrNr'rrr�MyStrr�
���rr�)r�
CommonTest�
test_countr]�
checkequalrP)r5r�s  rr�zUnicodeTest.test_count�s������*�*�4�0����Q����5����Q����5����Q��w��5����Q��w��5����Q��w��5����Q��w��b�9����Q��w��c�:����Q��w��a��<����Q��w��a��=�����/��#�>�����3�W�c�B�����8�'�8�L�����8�W�h�7�����8�W�l�;�����=�'�<�@�����0�'�4�@�����4�g�t�D�����9�7�I�N�����8�W�i�8�����8�W�m�<�����=�'�3E�F�	�C�	�����5��<��#�6rc��tjj|�|jdddd�|jdddd�|jdddd�|jdddd�|jdd	dd
�|jdd	dd�|jdd	dd�|j	d
ddd�|j	ddddd�|j	ddddd�|jd
ddd�|jddddd�|jdddddd�|jdddd�|jdddd�|jddddd�|jdddddd�|jddddd�|jdddddd�|jddddd�|jdddd�|jtdj�|jtdjd�|jdd dd!�|jdd"dd!�|jdd#dd�|jdd$dd�|jdd$dd
�|jdd%dd
�|jdd&dd'�|jdd(dd'�|jdd)dd*�|jdd$dd+�|jdd$dd,�|jdd%dd-�y).N�dufaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaĂ�findr�r��ȁ�Ġ�Ƞuhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa􀌄r��􀈄�􂀄r�abcdefghiabcrn�	r��def��тестuтr��e�тест тест�ес�r���ec�hellor
��ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂar���􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄a��􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄Ă�daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa��ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂ��ĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂa_r���􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄a_��􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄Ă_r�r�r�r�)rr��	test_findr�r]rhr�r�r9s rr�zUnicodeTest.test_finds������)�)�$�/�����1�6�8�D�����0�&�(�C�����0�&�(�C�����0�&�(�C�����5�v�|�L�����4�f�l�K�����4�f�l�K����Q����?����Q�����B����R�����B�	
����:�v�t�4�����:�v�t�Q�7�����J���a��;�����J���4�����.���?�����.����B�����.����1�E�����.����B�����/����A�F�����/����C�����/���>����)�W�\�\�2����)�W�\�\�2�6�����1�6�3�?�����5�v�s�C�����:�F�H�M�����I�v�x�8�����I�v�|�<�����N�F�L�A�����2�F�D�A�����6���E�����;�V�Y�O�����I�v�y�9�����I�v�}�=�����N�F�4F�Grc�|�tjj|�|jdddd�|jdddd�|jdddd�|jdddd�|jdd	dd
�|jdd	dd�|jdd	dd�|j	d
ddd�|j	dddd�|j	dddd�|jdddd�|jddddd�|jddddd�|jdddd�|jdddd�|jddddd�|jdddddd�|jddddd�|jdddddd�|jddddd�|jdddd�|jdddd�|jdddd�|jdd dd�|jdd!dd�|jdd!dd
�|jdd"dd
�|jdd#dd$�|jdd%dd$�|jdd&dd'�|jdd!dd(�|jdd!dd)�|jdd"dd*�y)+NrufĂaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa�rfindr�r�r�r�r�uh􀌄aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar�r�r�r�r�rn�r�r�r�uеr�r�r�r�r�r�r�r���aĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂr���a􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄��Ă􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄r�r���_aĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂĂ�_a��_a􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄��_Ă􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄􀌄�_Ă�Ăa�􀌄a�􀌄Ă)rr��
test_rfindr�r]r9s rr�zUnicodeTest.test_rfind;s������*�*�4�0�����/�'�8�D�����0�7�H�E�����0�7�H�E�����0�7�H�E�����3�W�l�K�����4�g�|�L�����4�g�|�L����Q�.�'�5�A����R�.�'�2�>����R���2�>�����:�w��5�����:�w��a�8�����J���q�9�����J���5�����.���@�����.����C�����.����A�F�����.����C�����/��&�!�Q�G�����/��&�!�D�����/��$�?�����/��#�>�����3�W�c�B�����8�'�8�L�����I�w��9�����I�w��=�����N�G�\�B�����0�'�4�@�����4�g�t�D�����9�7�I�N�����I�w�	�:�����I�w�
�>�����N�G�5G�Hrc�n�tjj|�|jdddd�|jdddd�|jdddd�|jddddd	�|j	t
djd
�|j	t
djdd	�|j	t
djd
d�|j	t
djd
d�|jdddd�|jdddd�|jdddd�|j	t
djd�|j	t
djd�|j	t
djd�|jdddd�|jdddd�|jdddd�|j	t
djd�|j	t
djd�|j	t
djd �y)!Nrr��indexr�r�r�rnr�r��hib�abcdefghiab�	abcdefghi�ghi�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)rr��
test_indexr]rh�
ValueErrorr�r�r9s rrzUnicodeTest.test_indexds������*�*�4�0����Q���"�=����Q���%�@����Q���%�@����Q���%��C����*�n�&:�&:�E�B����*�m�&9�&9�E�1�E����*�k�&7�&7�%��C����*�k�&7�&7�%��D�����1�7�C�@�����5�w��D�����:�G�X�N����*�y�&7�&7��B����*�y�&7�&7��F����*�~�&<�&<�l�K�����2�G�T�B�����6���F�����;�W�i�P����*�y�&7�&7��C����*�y�&7�&7��G����*�~�&<�&<�>P�Qrc��tjj|�|jdddd�|jdddd�|jdddd�|jd	dddd	d
�|j	t
djd�|j	t
djdd
�|j	t
djdd	d
�|j	t
djdd	d�|j	t
djdd	d
�|jd	ddd�|jd	ddd�|jd	ddd�|j	t
djd�|j	t
djd�|j	t
djd�|jd	ddd�|jd	ddd�|jd	ddd�|j	t
djd�|j	t
djd�|j	t
djd �y)!Nr�r��rindexr�r�r�r�rnrr�r�	defghiabcr�rrrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�)rr��test_rindexr]rhrrr�r9s rr
zUnicodeTest.test_rindex|s������+�+�D�1����R���B�?����Q���E�B����Q���E�B����Q���E�1�b�I����*�n�&;�&;�e�D����*�k�&8�&8�5�!�D����*�k�&8�&8�5�!�R�H����*�k�&8�&8�5�!�Q�G����*�k�&8�&8�5�!�R�H�����/��3�?�����3�X�s�C�����8�(�H�M����*�y�&8�&8�(�C����*�y�&8�&8�,�G����*�~�&=�&=�|�L�����0�(�D�A�����4�h��E�����9�8�Y�O����*�y�&8�&8�)�D����*�y�&8�&8�-�H����*�~�&=�&=�?Q�Rrc�4�|jdddtd�di�|jdddtd�dtd�td�i�|jdddtd�dtd�td�td	�d
i�|jd	ddtd�dtd�di�|jdd
dtd�di�|jdddddi�|jjddd��}|jddd|�|jjddd�}|jddd|�|j	djtjdd��d�|j	djtjddi��d�|j	djtjddi��d�|j	djtjddi��d�|j	djtjddi��d�|j	d jtjdd!d���d"�|j	d jtjddd���d#�|j	djtjdd$i��d%�|j	djtjddi��d�|j	djtjddi��d�|j	djtjdd!i��d&�|j	d'jtjdd(i��d)�d*}d+D]?}tj||i�}d,|z}|jt|j
|��A|jt|jj�|jt|jjdd-�|jt|jjd.d/�|jt|jjdd.�|jt|jjdd/d.�|jt|jjd0d.i�|jt|jjd1d.i�|jtd2j
�|jtdj
dd�y)3N�bbbc�abababc�	translater��iiicr��i�iiix�c�xr��xyyx�xzx�z�yyz<i>�r�r�z
<i><i><i>crn�xyz�d�xyzzy�abdcdcbddddz[a]�Xz[X]�[]�XXXz[XXX]�éu[é]�axb�123�x123uxéu<é>u[<é>]z[123]u[aé]u<€>u	[<€>é]rfu
aé€􏿿z[%s]�defgr�r��xy)r�r�)
r]�ord�	type2test�	maketransrTrrPrhrr�)r5�tbl�invalid_char�before�mappingr#s      r�test_maketrans_translatez$UnicodeTest.test_maketrans_translate�s������V�Y��!�#�h��-�	/����V�Y��!�#�h��c�#�h��C��A�	C����V�Y��!�#�h��c�#�h��C��#�c�(�C�P�	R����S�)�[�!�#�h��c�#�h��;�	=����V�U�K�!�#�h��-�	/�	
���Y�	�;�!�5�\�	+��n�n�&�&�T��'>�?�����\�9�k�3�G��n�n�&�&�u�e�S�9�����W�m�[�#�F�	
���������s�C�)@�A��	 �����������S�z�)B�C��	 �����������T�{�)C�D��	�����������U�|�)D�E� �	"�����������V�}�)E�F�!�	#����������T��7N�)O�P��	!����������T��7O�)P�Q� �	"�	
����������X��)G�H�#�	%�����+�+�C�M�M�6�3�-�,H�I��	 �����+�+�C�M�M�6�4�.�,I�J��	�����+�+�C�M�M�6�5�/�,J�K� �	"�����,�,�S�]�]�C��;L�-M�N�)�	+�"��-�F��m�m�V�\�$:�;�G��F�?�D����j�$�.�.�'�B�.�	
���)�T�^�^�%=�%=�>����*�d�n�n�&>�&>��v�N����)�T�^�^�%=�%=�q�%�H����)�T�^�^�%=�%=�u�a�H����)�T�^�^�%=�%=�u�e�Q�O����*�d�n�n�&>�&>��q�	�J����)�T�^�^�%=�%=��a�y�I����)�W�%6�%6�7����)�Y�%8�%8�%��Grc	�f�tjj|�dD]�\}}|dz}|dz}dD]y}|j||zg||zd|�|j||g||z|zd|�|j||zg||zd|dz�|j||g||dzz|zd|dz��{��y)N��ba�āĀ�𐌁𐌀r��rr��𐌂�splitr�)rr��
test_splitr��r5�left�right�delims    rr6zUnicodeTest.test_split�s������*�*�4�0�J�K�D�%��A�I�D��Q�J�E�6��������� $�u��g�u�>�����u�
� $�u��u� 4�g�u�F�������� $�u��g�u�q�y�B�����u�
� $�u�q�y� 0�5� 8�'�5�!�8�M�7�Jrc	��tjj|�dD]�\}}|dz}|dz}dD]y}|j||zg||zd|�|j||g||z|zd|�|j||zg||zd|dz�|j||g||dzz|zd|dz��{|j||zg||zdd���y)N)r0uюёr1r2r�)ruыr�r4�rsplitr�)rr��test_rsplitr�r7s    rr=zUnicodeTest.test_rsplit�s������+�+�D�1�Q�K�D�%��A�I�D��Q�J�E�<��������� $�u��h��?�����u�
� $�u��u� 4�h��G�������� $�u��h���	�C�����u�
� $�u�q�y� 0�5� 8�(�E�1�H�N�=�
�O�O�T�E�\�N�!�E�\�8�T�
;�Rrc	��tjj|�|jdddd�dD]�\}}|dz}|dz}dD]�}|j||zddf||zd|�|j|||f||z|zd|�|j||zddf||zd|d	z�|j||d	z|f||d	zz|zd|d	z�����y)
N)�ABCDEFGHr�r�r?�	partition�䈀r/r�r3r�r�)r�MixinStrUnicodeUserStringTest�test_partitionr�r7s    rrCzUnicodeTest.test_partitions����2�2�A�A�$�G����,�j�+�x�P�I�K�D�%��A�I�D��Q�J�E�6��������r�2� 6� $�u��k�5�B�����u�e� 4� $�u��u� 4�k�5�J�������r�2� 6� $�u��k�5�1�9�F�����u�q�y�%� 8� $�u�q�y� 0�5� 8�+�u�q�y�R�7�Jrc	��tjj|�|jdddd�dD]�\}}|dz}|dz}dD]�}|jdd||zf||zd|�|j|||f||z|zd|�|jdd||zf||zd|d	z�|j||d	z|f||d	zz|zd|d	z�����y)
N)r�r�r?r?�
rpartitionrAr/r�r3r�r�)rrB�test_rpartitionr�r7s    rrFzUnicodeTest.test_rpartitions����2�2�B�B�4�H����,�j�,��Q�I�K�D�%��A�I�D��Q�J�E�6������R���� 6� $�u��l�E�C�����u�e� 4� $�u��u� 4�l�E�K�����R���� 6� $�u��l�E�A�I�G�����u�q�y�%� 8� $�u�q�y� 0�5� 8�,��PQ�	�S�7�Jrc
��tjj|�Gd�d�}|jdddgd��|jdddd�|jd	ddtjd
��|jdddgd��|jdddgd��|jdddd�|jd	ddtjd
��|jtdddd|d
�g�|jtdddddt�g�|jtddgd��|jtddgd��y)Nc��eZdZd�Zd�Zy)�(UnicodeTest.test_join.<locals>.MyWrapperc��||_yr1��sval)r5rLs  rr6z1UnicodeTest.test_join.<locals>.MyWrapper.__init__'s��$�d�irc��|jSr1rKr9s rr:z0UnicodeTest.test_join.<locals>.MyWrapper.__str__(s��d�i�i�/rNr<rrr�	MyWrapperrI&s��6�/rrNza b c drgr�)r�r�rr�abcdr�zw x y z�wxyz�1�2�foo�3)r�r�r�)rQrRr�)rrB�	test_joinr]�Sequence�checkraisesr��bytes)r5rNs  rrUzUnicodeTest.test_join#s0���2�2�<�<�T�B�	0�	0�
	
���Y��V�5I�J����V�R��1E�F����Y��V�\�5J�5J�6�5R�S����Y��V�5I�J����Y��V�5I�J����V�R��1E�F����Y��V�\�5J�5J�6�5R�S�����C��#�s�I�e�<L�1M�N�����C��#�s�C���1I�J�����C���;�����C���?rlz*needs too much memory on a 64-bit platformc��ttjdz�dz}d|zf|z}|jtdj
|�y)Ng�?r��Ar�)�int�sys�maxsizerh�
OverflowErrorr�)r5�size�seqs   r�test_join_overflowzUnicodeTest.test_join_overflow7sB���3�;�;��#�$�q�(���T�z�m�d�"�����-����#�6rc
��tjj|�|jdddddd�|j	t
djdd�d	D]�\}}|d
z}|d
z}dD]�}dD]�}|j||z||zd||�|j||z|z||z|zd||�|j||z||zd|d
z|�|j||z|z||d
zz|zd|d
z|�������y)Nzone@two!three!zone!two!three!�replace�!�@r��rr
r/r�r3)ruău𐌃r�)rr��test_replacer]rhr�rcr�)r5r8r9r:�repls     rrgzUnicodeTest.test_replace>s'�����,�,�T�2�	
���-�/?��C�QT�VW�X����)�Y�%6�%6��R�@�I�K�D�%��A�I�D��Q�J�E�6��9�D��O�O�D�5�L�$(�5�L�)�U�D�J��O�O�D�4�K�%�$7�$(�5�L�5�$8�$-�u�d�<��O�O�D�5�L�$(�5�L�)�U�Q�Y��N��O�O�D�4�K�%�$7�$(�5�1�9�$4�u�$<�$-�u�q�y�$�@�:�7�Jrc�P�d}d}|j|j||�|�y)Nrnzabc def)r_rc)r5�patternr#s   r�test_replace_idzUnicodeTest.test_replace_idUs%�������
�
�d�l�l�7�G�4�d�;rc��d}d}|jt|�t|��|jt|�t|��|jt|�t|dz��|jt|�t|dz��|jt|�t|dz��|jt|�td|z��|jt|�t|dz��Gd�dt�}|d	�}|jt|�t|��|jt|�t|dz��|jt|�t|dz��|jt|�t|dz��|jt|�td|z��|jt|�t|dz��y)
Nz123abc1@z456zyx-+���rr�r�c��eZdZy)�5UnicodeTest.test_repeat_id_preserving.<locals>.SubStrNr'rrr�SubStrrofr�rrpzqwerty())rT�idrkrP)r5r�r�rp�ss     r�test_repeat_id_preservingz%UnicodeTest.test_repeat_id_preserving[s�����������A���1��&����B�q�E�2�a�5�)����B�q�E�2�a�"�f�:�.����B�q�E�2�a�!�e�9�-�����A���1�q�5�	�*�����A���1�q�5�	�*����B�q�E�2�a�!�e�9�-�	�S�	�
�:�������A���1��&����B�q�E�2�a�"�f�:�.����B�q�E�2�a�!�e�9�-����B�q�E�2�a�!�e�9�-����B�q�E�2�a�!�e�9�-����B�q�E�2�a�!�e�9�-rc�V�tj�5tjdt�|jddk(d�|jddk7d�|jdt
d�k(d�|jdt
d�k7d�ddd�y#1swYyxYw)N�ignorern�abcFT)r�check_warnings�warnings�simplefilter�BytesWarningrT�	bytearrayr9s r�test_bytes_comparisonz!UnicodeTest.test_bytes_comparisonqs���
�
+�
+�
-��!�!�(�L�9����U�f�_�e�4����U�f�_�d�3����U�i��&7�7��?����U�i��&7�7��>�.�
-�
-�s�BB�B(c������jdd��jddkD��jddk�	�jddk�y)NrnrOu��u��)rTrU)r5�
test_fixup�
test_lecmps`@@r�test_comparisonzUnicodeTest.test_comparisonysJ��������&�������'�������'��f	
�����7�8rc�8��t�|��|jddd�|jdj	��|jdj	��|jdj	��|jdj	��|jdj	��|jd	j	��|jd
j	��|jdj	��y)NF�ῼ�islower�Ⅷ�ⅷ�𐐁�𐐧�𐐩�𐑎r��👯)�super�test_islowerr]�assertFalser�rU�r5�	__class__s �rr�zUnicodeTest.test_islower�s����
�������U�H�i�8�����)�)�+�,�����(�(�*�+�����-�-�/�0�����-�-�/�0�����,�,�.�/�����,�,�.�/�����-�-�/�0�����-�-�/�0rc�8��t�|��|jddd�|jdj	��|jdj	��|jdj	��|jdj	��|jdj	��|jd	j	��|jd
j	��|jdj	��y)NFr��isupperr�r�r�r�r�r�r�r�)r��test_isupperr]rUr�r�r�s �rr�zUnicodeTest.test_isupper�s����
�������U�H�i�8�����(�(�*�+�����)�)�+�,�����,�,�.�/�����,�,�.�/�����-�-�/�0�����-�-�/�0�����-�-�/�0�����-�-�/�0rc�V��t�|��|jddd�|jddd�|jdj	��|jdj	��dD]1}|j|j	�dj
|���3y)	NTr��istitleuGreek ῼitlecases ...u𐐁𐐩u𐐧𐑎)r�r�r�r�z{!a} is not title)r��test_istitler]rUr�r��format�r5�chr�s  �rr�zUnicodeTest.test_istitle�s����
�������T�8�Y�7����T�#>�	�J�	
���.�6�6�8�9����.�6�6�8�9�J�B����R�Z�Z�\�+>�+E�+E�b�+I�J�Krc���t�|��|jddd�|jddd�|jddd�dD]1}|j|j	�dj|���3y)	NTu �isspaceu Fu—�r�r�r�r�r�r�z{!a} is not space.)r��test_isspacer]r�r�r�r�s  �rr�zUnicodeTest.test_isspace�sr���
�������T�8�Y�7����T�8�Y�7����U�H�i�8�/�B����R�Z�Z�\�+?�+F�+F�r�+J�K�/r�cpuc��ttjdz�D]`}t|�}t	j
|�}t	j|�}|j|j�|dvxs|dk(��by)Nr�)�WS�B�S�Zs)	r�r\�
maxunicoder��unicodedata�
bidirectional�categoryrTr�)r5�	codepoint�charr�r�s     r�test_isspace_invariantz"UnicodeTest.test_isspace_invariant�so���s�~�~��1�2�I��y�>�D�'�5�5�d�;�M�"�+�+�D�1�H����T�\�\�^�+�/?�?�2�!)�T�!1�
4�	3rc���t�|��dD]1}|j|j�dj	|���3y)N)r�r�r�r��𝟶�𑁦�𐒠�🄇z{!a} is alnum.)r��test_isalnumrU�isalnumr�r�s  �rr�zUnicodeTest.test_isalnum�s<���
����K�B��O�O�B�J�J�L�*:�*A�*A�"�*E�F�Krc���t�|��|jddd�|jdj	��|jdj	��|jdj	��|jdj	��|jdj	��|jd	j	��y)
NTr��isalphar�r�r�r�r�r�)r��test_isalphar]rUr�r�r�s �rr�zUnicodeTest.test_isalpha�s����
�������T�8�Y�7�����,�,�.�/�����,�,�.�/�����,�,�.�/�����,�,�.�/�����-�-�/�0�����-�-�/�0rc���t�|��|jdj��|jdj��y)N�€�􏿿)r��test_isasciir��isasciir�s �rr�zUnicodeTest.test_isasciis<���
��������)�)�+�,�����-�-�/�0rc�<�|jddd�|jddd�|jddd�|jddd�|jddd�|jdd	d�|jdd
d�|jddd�|jtddd
�dD]1}|j|j	�dj|���3dD]1}|j
|j	�dj|���3y)NFr��	isdecimalr�T�0�①�¼�٠�
0123456789�0123456789arnr
)r�r�r�r�r�r��𑁥r�z{!a} is not decimal.)r�r�r�z{!a} is decimal.)r]rWr�r�r�r�rU�r5r�s  r�test_isdecimalzUnicodeTest.test_isdecimal	s�����U�B��4����U�C��5����T�3��4����U�H�k�:����U�F�K�8����T�8�[�9����T�<��=����U�M�;�?�����E�;��;�K�B����R�\�\�^�-C�-J�-J�2�-N�O�K�=�B��O�O�B�L�L�N�,>�,E�,E�b�,I�J�=rc�l��t�|��|jddd�|jddd�|jddd�dD]1}|j|j	�dj|���3d	D]1}|j
|j	�d
j|���3y)NTr��isdigitFr�r�)r�r�r�r�r�r�r�z{!a} is not a digit.)r�r�r�r�z{!a} is a digit.)r��test_isdigitr]r�r�r�rUr�s  �rr�zUnicodeTest.test_isdigits����
�������T�8�Y�7����U�F�I�6����T�8�Y�7�=�B����R�Z�Z�\�+A�+H�+H��+L�M�=�K�B��O�O�B�J�J�L�*<�*C�*C�B�*G�H�Krc�N�|jddd�|jddd�|jddd�|jddd�|jddd�|jdd	d�|jdd
d�|jddd�|jtdjd
�dD]1}|j	|j�dj|���3dD]1}|j
|j�dj|���3y)NFr��	isnumericr�Tr�r�r�r�r�r�rnr
r�z{!a} is not numeric.)r�r�r�r�r�z{!a} is numeric.)r]rhr�r�r�r�rUr�s  r�test_isnumericzUnicodeTest.test_isnumeric's�����U�B��4����U�C��5����T�3��4����T�8�[�9����T�6�;�7����T�8�[�9����T�<��=����U�M�;�?����)�U�_�_�b�9�/�B����R�\�\�^�-C�-J�-J�2�-N�O�/�/�B��O�O�B�L�L�N�,>�,E�,E�b�,I�J�/rc���|jdj��|jdj��|jdj��|jdj��|jdj��|jdj��|jdj��|jdj��|jd	j��|jd
j��|jdj��|jdj��y)
Nr��Z�_�b0�bc�b_�µu𝔘𝔫𝔦𝔠𝔬𝔡𝔢rg�[�©r�)rU�isidentifierr�r9s r�test_isidentifierzUnicodeTest.test_isidentifier:s������(�(�*�+�����(�(�*�+�����(�(�*�+�����)�)�+�,�����)�)�+�,�����)�)�+�,�����)�)�+�,����6�C�C�E�F�����)�)�+�,�����)�)�+�,�����*�*�,�-�����)�)�+�,rNzneed _testcapi modulec�0�d}|j|j��tj�5t	j
dt�|jtj|�j��ddd�y#1swYyxYw)Nu𝖀𝖓𝖎𝖈𝖔𝖉𝖊ru)	rUr�rrwrxry�DeprecationWarning�	_testcapi�unicode_legacy_string)r5�us  r�test_isidentifier_legacyz$UnicodeTest.test_isidentifier_legacyIse��
+��������(�)�
�
+�
+�
-��!�!�(�,>�?��O�O�I�;�;�A�>�K�K�M�N�.�
-�
-�s�A
B�Bc�2�|jdj��|jdj��|jdj��|jdj��|jdj��|jdj��|jdj��|jdj��|jd	j��y)
Nr�rg�abcdefgzabcdefg
�ʹ�͸��r�u󠀠)rU�isprintabler�r9s r�test_isprintablezUnicodeTest.test_isprintableSs���������(�)�������)�*����	�-�-�/�0�����0�0�2�3�����,�,�.�/�����-�-�/�0�����-�-�/�0�����0�0�2�3�����1�1�3�4rc	��dD]_}|j|j��|j|j��|j|j	���adD]_}|j|j��|j|j��|j|j	���adD]7}tt|�}dD] }|j||�|�d|�d���"�9dD]7}tt|�}dD] }|j||�|�d|�d���"�9y)	N)�a�b��a�b��	a�b�a�	a�b�a)uA�B�uA�B�u	A�B�Au	A�B�A)r�r�r�)r����������.z() is False)r�r�r�r�r�r�r�r�)r�r�r�r�r�r�r�r�)rUr�r�r�r�rSrP)r5rr�	meth_name�meths    r�test_surrogateszUnicodeTest.test_surrogatesbs	��8�A��O�O�A�I�I�K�(����Q�Y�Y�[�)����Q�Y�Y�[�)�	8�
8�A����Q�Y�Y�[�)��O�O�A�I�I�K�(��O�O�A�I�I�K�(�	8�;�I��3�	�*�D�I��� � ��a���9�*M�N�J�;�
9�I��3�	�*�D�<��� � ��a���9�*M�N�<�	9rc��tjj|�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jd	j	�d
�|jdj	�d�|jd
j	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�y)Nr��𐑏�𐐧𐐧�𐑏𐑏�𐐧𐑏�
X𐐧x𐑏u
x𐑏x𐑏�fi�İ�i̇�Σ�σ�ͅΣuͅσ�AͅΣuaͅς�AͅΣauaͅσa�AΣͅuaςͅ�Σͅ uσͅ �򏿾r�)rr��
test_lowerrT�lowerr9s rr�zUnicodeTest.test_lower}s������*�*�4�0�����+�+�-�|�<����/�5�5�7�/�	1����/�5�5�7�/�	1����1�7�7�9�1�	3���������.�������)�>�:�������)�8�4�����-�-�/��@�����.�.�0�/�B����)�/�/�1�3C�D�����.�.�0�/�B�����.�.�0�/�B�����.�.�0�/�B�����+�+�-�|�<�������)�8�4rc���|jdj�d�|jdj�d�|jdj�d�|jdj�d�|jdj�d�|jd	j�d
�|jdj�d�y)
Nr��hELlo�ß�ssr��fir�r�r�uaισr�uμ)rT�casefoldr9s r�
test_casefoldzUnicodeTest.test_casefold�s�������)�)�+�W�5�����)�)�+�W�5��������$�/�������)�4�0�����*�*�,�h�7�����1�1�3�_�E�����*�*�,�h�7rc��tjj|�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d	�|jd
j	�d
�|jdj	�d�|jdj	�d
�|jdj	�d�|jdj	�d�|jdj	�d�y)Nr�r�r�r�r�r�u
X𐐧X𐐧r��FIr�r�r�SS�ῒ�Ϊ̀r�r�r�)rr��
test_upperrT�upperr9s rr
zUnicodeTest.test_upper�s(�����*�*�4�0�����+�+�-�|�<����/�5�5�7�/�	1����/�5�5�7�/�	1����1�7�7�9�1�	3���������-�������)�8�4�������)�8�4��������t�,�������)�+?�@�����+�+�-�|�<�������)�8�4rc��tjj|�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d	�d
}|jdj	�|�|jdj	�d
�|jdj	�d�y)Nr�r�r�r��𐑏𐐧r�u
X𐑏x𐑏uhİuHi̇u	Ϊ̀i̇uῒİufinnish�Finnishr�uAͅς)rr��test_capitalizerT�
capitalize)r5�exps  rrzUnicodeTest.test_capitalize�s�����/�/��5�����0�0�2�L�A����/�:�:�<�/�	1����/�:�:�<�/�	1����/�:�:�<�/�	1����1�<�<�>�1�	3�����-�-�/��A�.������2�2�4�c�:�����.�.�0�)�<�����3�3�5��Grc�b��t�|��|jdj�d�|jdj�d�|jdj�d�|jdj�d�|jdj�d�|jdj�d	�|jd
j�d�|jdj�d
�|jdj�d�y)Nr�r�r�r�u𐑏𐑏 𐑏𐑏u𐐧𐑏 𐐧𐑏u𐑏𐐧 𐑏𐐧uX𐐧x𐑏 X𐐧x𐑏uX𐑏x𐑏 X𐑏x𐑏ufiNNISHru	AΣ ᾡxyu	Aς ᾩxyuAΣAuAσa)r��
test_titlerT�titler�s �rrzUnicodeTest.test_title�s	���
��������+�+�-�|�<����/�5�5�7�/�	1����D�J�J�L�D�	F����D�J�J�L�D�	F����D�J�J�L�D�	F����H�N�N�P�H�	J�����)�)�+�Y�7����+�1�1�3�5G�H�����)�)�+�Z�8rc���tjj|�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jd	j	�d
�|jdj	�d�|jd
j	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jdj	�d�|jd
j	�d�|jdj	�d�|jdj	�d�y)Nr�r�r�r�r�rr�u
x𐑏X𐐧r�r	r�r�r�r�r�uΙσr�uaΙςr�uaΙσAr�uaςΙr�uσΙ rr
rr)rr��
test_swapcaserT�swapcaser9s rrzUnicodeTest.test_swapcase�s������-�-�d�3�����.�.�0�,�?�����.�.�0�,�?����/�8�8�:�/�	1����/�8�8�:�/�	1����/�8�8�:�/�	1����1�:�:�<�1�	3�������)�4�0�����*�*�,�n�=�����*�*�,�h�7�����0�0�2�N�C�����1�1�3�_�E����)�2�2�4�6F�G�����1�1�3�_�E�����1�1�3�_�E�����1�1�3�_�E�����*�*�,�h�7��������$�/�����*�*�,�.B�Crc��tjj|�|jdj	dd�d�|jdj	dd�d�|jdj	dd�d�y)	Nrr�r�ux􏿿r�u	􏿿x􏿿r�u
􏿿x􏿿􏿿)rr��test_centerrT�centerr9s rrzUnicodeTest.test_center�sp�����+�+�D�1�������A�|�4�&�	(�������A�|�4�0�	2�������A�|�4�:�	<ri���zrequires 32-bit systemc��d}	d|z}	|jtj�~y#t$r|jd|dzz�Y�EwxYw#~wxYw)NiVUU�üz$no enough memory (%.0f MiB required)i)�MemoryError�skipTestrhr^r)r5r_rrs   r�test_case_operation_overflowz(UnicodeTest.test_case_operation_overflow�sc����	S��t��A�	����m�Q�W�W�5����	S��M�M�@�D�5�L�Q�R�	S��
�s�,� A� A�A�Ac��|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd	�|jdd
�|jdd�|jd
d�|jd
d�|jd
d�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jdd�|jtdj�dD]e}|dz}dD]Y}|j||�|j|||z�|j|dz|�|j|dz||dzz��[�gy)Nr��abdb�bdab�bdaba�bdba�bdb)r�r�N)r�Nr�)rr��y)rr�NrO�abcxxxx�abrn)r�Nr+r��zabczabc�asdf�asd)r��Āu𐌀r�r3r�)�assertIn�assertNotInrhr��__contains__)r5�fillr:s   r�
test_containszUnicodeTest.test_containss���
�
�c�6�"��
�
�c�6�"��
�
�c�7�#��
�
�c�6�"�����e�$��
�
�c�6�"��
�
�c�<�(��
�
�c�<�(��
�
�c�<�(��
�
�c�<�(�����k�*�����l�+������+��
�
�d�F�#��
�
�d�E�"��
�
�d�M�*��
�
�b�%� ��
�
�b�"���
�
�b�%� �����u�%��
�
�d�G�$��
�
�d�G�$��
�
�c�7�#��
�
�f�f�%������'������$����)�U�%7�%7�8�1�D��A�I�D�6��� � ���-��
�
�e�T�E�\�2�� � ����D�1��
�
�e�a�i����	�)9�:�	7�2rc�0�dj�dj�dj�dj�dj	�dj�dj
dd�djdd�djdd�y)Nu𐀀􀀀�􀀀r��𐀀)	rrrrrrr�ljust�rjustr9s r�test_issue18183zUnicodeTest.test_issue18183'sz���$�$�&��'�'�)��$�$�&��)�)�+��$�$�&��'�'�)����A�|�,����1�l�+����1�l�+rc��5�|jdj�d�|jdj�d�|jdj�d�|jdj�d�|jdj�d�|jdj�d	�|jd
j�d�|jdj�d
�ddl}|jdjd�d�|jdjtd���d�|jdjd�d�|j	ddd�}|jdj|�d�Gd�d�}Gd�d�}Gd�d �}Gd!�d"�}Gd#�d$�}Gd%�d&|j�}Gd'�d(t
�}	Gd)�d*�}
Gd+�d,�}|jdj�d�|jd-j�d-�|jd.jd-�d-�|jd/jd-�d-�|jd0jd-�d1�|jd2jd-�d3�|jd4jd-�d5�|jd6jd7d-�d-�|jd8jd7d-�d1�|jd9jd7d-�d3�|jd:jd7d-�d5�|jd.jd;�d<�|jd=jd;d-�d>�|jd?jd;d-�d@�|jdAj�dB�|jdCj�dD�|jdEj�dF�|jdGj�dH�|jdIjdJ�dK�|jdLj�dM�|jdNj�dO�|jdPj�dQ�|jdRjdSdTi�dT�|jdUjdVdTi�dT�|jdWjdXdYi�dZ�|jd[j|d\��]�d^�|jd_j|d`�|d\��da�|jdbj||d-���d-�|jdcjd-ddg�d-�|jdejd-ddg�dd�|jdfjd-ddgg�dd�|jdgjd-|dd�gg�dd�|jdhjd-�d-�|jdhjd�d�|jdhjdi�d-�|jdjjdi�d�|jdkjd-�d-�|jdljd-�d-�|jdmjd-�d�|jdnjd-�do�|jdpjdq�dq�|jdrjdq�dq�|jdsjdq�dq�|jdtjdq�du�|jdvjdq�dw�|jdxjdq�dy�|jdzjdq�dy�|jd{jdq�d|�|jd}jdq�d~�|jdjdq�d��|jd�jdq�d��|jd�jdq�d��|jd�jdq�d��|jd�jdq�dq�|jd�jdq�d��|jd�jdq�d��|jd�jdq�d��|jd�jdq�d��|jd�jd�ddXd�zz�|jd�jd�dXd�z�|jd�jd�dXd�z�|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jdY�d��|jd�jdY�d��|jd�jdY�d��|jd�jdY�d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�j|��d-�|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�jd��d��|jd�j|d���d��|jd�jd��d��|jd�jd��d«|jd�j|d���dë|jd�jd��d��|jd�jd��d��|jd�jd��dū|jd�jd��d��|jd�j|d���d��|jd�j|d���dǫ|jd.ji�dF�|jd.jg�dȫ|jd.jd7g�dɫ|jd�j|d˫�d̫|jd�j|d˫�dͫ|j
td�j|d˫�|j
td�j|d˫�|j
td�j|d˫�|jd�j|dddѬҫ�dӫ|jd.j|	d`��d^�|jd/jd�d�|jd�jd�d֫d׫|jd�jd�d֫d׫|jd�jd�d֬ګd׫|jd�jd�d`d֬ܫdݫ|jd�jd�d�d߬ܫdݫ|j
tdBj�|j
tdDj�|j
tdj�|j
tdj�|j
td�j�|j
td�j�|j
td.j�|j
td6jd-�|j
tdHj�|j
tdOj�|j
td�j�|j
td�j�|j
td�j�|j
td�jd�|j
td�j�|j
td�jg�|j
td�j�|j
td�jd�|j
td�jd�|j
td�jd�|j
td�jd�|j
td�j�|j
td�jd�|j
td�jd�|j
td�jdY��|j
td�jdY�|j
td�jd�|j
td�jd�|j
td�j�|j
td�j�|j
td�j�|j
tdFj�d�}|j
tdB|zdDzj�|j
td�|zd�zjdg�|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
td�jd��|j
t�djdg�|j
t�djdg�|j
t�dj�d�d�|j
t�djd-�dd�|j
t�djdd7�ddY�dd֐d	�d
�
�d}
|jt|
�djd�|jt|
td�d
��d}|jt|�djd�|j
t�djd�|j
ttd�d�|j
ttd�d�|j�dj�d�d��d�|jdhj�d��d�|jdjj�d�d�|j�djdFd�i�d߫|j�djdFdi�d�|j�djdBdi�d�|j�djdDdi�d�|j�dj�ddi�d�|j�dj�ddi�d�|j
t�dj�d�|j
t�d j�d�|j
t�d!j�d�|j�d"jd�d#��d$�|
d˫}|j�d%j|��d&�|j
t�d'j|�|j
tdFj|�|d˫}|j�d%j|��d(�|j�d'j|��d(�|j
tdFj|�y()Nr�r�r+�a{{�a{�a}}�a}�{{b�{b�}}b�}b�a{{b�a{brzMy name is {0}�FredzMy name is FredzMy name is {0[name]})�namezMy name is {0} :-{{}}zMy name is Fred :-{}i�r�zThe year is {0.year}zThe year is 2007c��eZdZdd�Zd�Zy)�"UnicodeTest.test_format.<locals>.Cc��||_yr1��_x�r5rs  rr6z+UnicodeTest.test_format.<locals>.C.__init__J�	����rc��|Sr1r�r5�specs  r�
__format__z-UnicodeTest.test_format.<locals>.C.__format__L����rN�r��r(r)r*r6rSrrr�CrJI���
�
rrWc��eZdZd�Zd�Zy)�"UnicodeTest.test_format.<locals>.Dc��||_yr1�rrNs  rr6z+UnicodeTest.test_format.<locals>.D.__init__P�	����rc�,�t|j�Sr1)rPrrQs  rrSz-UnicodeTest.test_format.<locals>.D.__format__Rs���4�6�6�{�"rNrVrrr�DrZOs��
�
#rr_c��eZdZd�Zd�Zy)�"UnicodeTest.test_format.<locals>.Ec��||_yr1r\rNs  rr6z+UnicodeTest.test_format.<locals>.E.__init__Wr]rc�&�d|jzdzS)NzE(�)r\r9s rr:z*UnicodeTest.test_format.<locals>.E.__str__Y����d�f�f�}�s�*�*rNr<rrr�EraV���
�
+rrfc��eZdZd�Zd�Zy)�"UnicodeTest.test_format.<locals>.Fc��||_yr1r\rNs  rr6z+UnicodeTest.test_format.<locals>.F.__init__^r]rc�&�d|jzdzS)NzF(rdr\r9s rrBz+UnicodeTest.test_format.<locals>.F.__repr__`rerNrCrrr�Fri]rgrrlc��eZdZd�Zd�Zd�Zy)�"UnicodeTest.test_format.<locals>.Gc��||_yr1r\rNs  rr6z+UnicodeTest.test_format.<locals>.G.__init__er]rc� �d|jzS)Nz
string is r\r9s rr:z*UnicodeTest.test_format.<locals>.G.__str__gs��#�d�f�f�,�,rc�\�|dk(rd|jzdzStj||�S)NrzG(rd)rrXrS�r5�format_specs  rrSz-UnicodeTest.test_format.<locals>.G.__format__is0���#�%��$�&�&�=�3�.�.��(�(��{�;�;rN)r(r)r*r6r:rSrrr�Grnds��
�
-�
<rrtc��eZdZd�Zy)�"UnicodeTest.test_format.<locals>.Ic�$�|j|�Sr1)�strftimerrs  rrSz-UnicodeTest.test_format.<locals>.I.__format__os���}�}�[�1�1rN�r(r)r*rSrrr�Irvns��
2rrzc��eZdZd�Zy)�"UnicodeTest.test_format.<locals>.Jc�4�tj|dz|�S)Nr�)r[rSrrs  rrSz-UnicodeTest.test_format.<locals>.J.__format__ss���~�~�d�Q�h��<�<rNryrrr�Jr|rs��
=rr~c��eZdZd�Zd�ZdZy)�"UnicodeTest.test_format.<locals>.Mc��||_yr1r\rNs  rr6z+UnicodeTest.test_format.<locals>.M.__init__wr]rc�&�d|jzdzS)NzM(rdr\r9s rrBz+UnicodeTest.test_format.<locals>.M.__repr__yrerN)r(r)r*r6rBr:rrr�Mr�vs��
�
+��Grr�c��eZdZd�Zd�ZdZy)�"UnicodeTest.test_format.<locals>.Nc��||_yr1r\rNs  rr6z+UnicodeTest.test_format.<locals>.N.__init__~r]rc�&�d|jzdzS)NzN(rdr\r9s rrBz+UnicodeTest.test_format.<locals>.N.__repr__�rerN)r(r)r*r6rBrSrrr�Nr�}s��
�
+��Jrr�rn�{0}z{0:}zX{0}�Xabcz{0}X�abcXzX{0}Y�XabcYz{1}r�zX{1}z{1}XzX{1}Yi�z-15z{0}{1}z-15abcz{0}X{1}z-15Xabcz{{�{z}}�}z{{}}�{}z{{x}}z{x}z{{{0}}}�{z{123}z	{{{{0}}}}z{{0}}z}}{{z}{z}}x{{z}x{z{0[foo-bar]}zfoo-bar�bazz{0[foo bar]}zfoo barz{0[ ]}rgr�rT�{foo._x}�)rS�20z{1}{0}r��2010z{0._x.x}z{0[0]}r�z{0[1]}z	{0[1][0]}z{0[1][0].x}z{0:.3s}�abcdefz{0:.0s}z{0:3.3s}z{0:2.3s}z{0:2.2s}z{0:3.2s}zab z{0:x<0s}rWz{0:x<5s}z{0:x<6s}z{0:x<7s}�resultxz{0:x<8s}�resultxxz{0: <7s}zresult z{0:<7s}z{0:>7s}z resultz{0:>8s}z  resultz{0:^8s}z result z{0:^9s}z	 result  z{0:^10s}z
  result  z{0:8s}zresult  z{0:0s}z{0:08s}�result00z{0:<08s}z{0:>08s}�00resultz{0:^08s}�0result0z	{0:10000}i'i'z{0:10000000}i���z{0:<6s}rSzfooz{0:<6s}zfooz{0:^6s}zfooz{0:^6s}z foo  z{0:<6}z3z{0:<6}z3z{0:^6}z3z{0:<6}z3     ���Q�	@z3.14z3.14z3.14z{0:^6}z 3.14 z{0:<12}y@@z(3+2j)z{0:<12}z(3+2j)z{0:^12}z(3+2j)z{0:^12}z   (3+2j)   z{0:abc}z{0!s}�Helloz{0!s:}z{0!s:15}zHello          z	{0!s:15s}z{0!r}z'Hello'z{0!r:}zF(Hello)r�z'\u0378'r�u'ʹ'uF(ʹ)z{0!a}z'\u0374'z{0!a:}z	F(\u0374)rz[1]z{0:d}�datazG(data)zstring is dataz{0:^10}z{0:>15s}z{0:date: %Y-%m-%d}�)�year�month�dayzdate: 2007-08-27z{0:.{1}}�hello world�r�z	{0:.{1}s}z{0:.{precision}s})�	precisionz{0:{width}.{precision}s})�widthr�z
hello     �10�5�{a�}azabc{0:{}z{0z{0.}z{0[}z{0]}z{0.[]}z{0..foo}z{0[0}z	{0[0:foo}z{c]}z	{{ {{{0}}z{0}}z{foo})�barz{0!x}z{0!}z{0!rs}z{!}z{:}z{:s}�,23098475029384702983476098230754973209482573z{[z]}z{0:x}��?��?z{0:X}z{0:o}z{0:u}z{0:i}z{0[0]x}z
{0[0](10)}z{0[{1}]}r�r�z{0:{1:{2}}}rrz{0:{1:{2:{3:{4:{5:{6}}}}}}}r�r�r�z+Sign not allowed in string format specifierz{0:-s}�-z,Space not allowed in string format specifierz{: }z{0:=s}�#z#20z
{0:s}{1:s}�ABCuАБВu	ABCАБВz{[{}]}z{[{]}z{[}]}z{[[]}r�z{[!]}rdz{a{}b}r
z{a{b}z{[}z0x{:0{:d}X}��0x0000000000000000�{!r}zM(data)z{!s}zN(data))rTr��datetime�dict�dater[rhr�r�
IndexError�KeyError�assertRaisesRegex)r5r�rrWr_rfrlrtrzr~r�r��big�sign_msg�	space_msg�m�ns                 r�test_formatzUnicodeTest.test_format2s����������b�)��������s�+���������-���������.���������.���������.���������.��������%�0�	����)�0�0��8�:K�L����/�6�6�t��7H�I�*�	,����0�7�7��?�/�	1�
�M�M�$��2�&�����/�6�6�q�9�+�	-�	�	�	#�	#�	+�	+�	+�	+�	<�	<�	2��
�
�	2�	=��	=�	�	�	�	�	
�������b�)���������/�������e�,�e�4�������u�-�u�5�������u�-�v�6�������u�-�v�6��������.��8�������a��/��7�������q�%�0�&�9�������q�%�0�&�9��������5�1�7�;�������c�*�E�2��������e�4�h�?�����)�)�#�u�5�y�A���������,���������,��������$�/�������)�5�1�����)�)�#�.��8�����+�+�-�w�7��������$�/�������)�5�1�	
����.�.�	�%�/@�A�5�I�����.�.�	�%�/@�A�5�I�������#�a��1�3�7�����*�*�q��u�*�5�t�<��������2���"��6��?�����*�*�1�Q�u�X�;�7��?�������%���8�%�@�������%���8�%�@�����+�+�U�U�G�,<�=�u�E�����-�-�u�q��x�j�.A�B�E�J�	
����)�)�%�0�%�8�����)�)�$�/��6�����)�)�(�3�U�;�����)�)�(�3�R�8�����*�*�5�1�5�9�����*�*�5�1�5�9�����*�*�5�1�4�8�����*�*�5�1�5�9�����*�*�8�4�h�?�����*�*�8�4�h�?�����*�*�8�4�h�?�����*�*�8�4�i�@�����*�*�8�4�j�A�����*�*�8�4�i�@�����)�)�(�3�Y�?�����)�)�(�3�Y�?�����)�)�(�3�Z�@�����)�)�(�3�Z�@�����)�)�(�3�[�A�����*�*�8�4�l�C��������2�J�?��������2�H�=�����)�)�(�3�Z�@�����*�*�8�4�j�A�����*�*�8�4�j�A�����*�*�8�4�j�A�����+�+�C�0�#��d�
�2B�C�����+�+�B�/��u��=�����.�.�r�2�C�(�N�C�	
����-�-�e�4�6G�H�����-�-�e�4�6G�H�����-�-�e�4�6G�H�����)�)�%�0�(�;�����,�,�Q�/�1H�I�����,�,�Q�/�1H�I�����,�,�Q�/�1H�I��������+�X�6�����,�,�T�2�N�C�����,�,�T�2�N�C�����,�,�T�2�N�C��������.��9�����-�-�f�5�7W�X�����-�-�f�5�7W�X�����-�-�f�5�7W�X�����)�)�&�1�>�B�	
����)�)�!�#�.��6�	
�������0�'�:��������1�7�;�����*�*�7�3�5F�G�����+�+�G�4�6G�H��������0�)�<��������1�9�=��������'�
�3�Z�@��������1�;�?��������1�:�>��������(��4�k�B��������0�)�<��������1�;�?��������1�;�?��������1�9�=��������'�
�3�Z�@��������(��4�l�C�	
������b�)�4�0�������b�)�4�0�������q�c�*�E�2��������&�	�2�I�>��������&�	�2�4D�E����)�Y�%5�%5�q��y�A����)�Z�%6�%6��&�	�B����)�Z�%6�%6��&�	�B����-�4�4�Q�D�=>�;=�6?�@�,�	-�	
������a��e�,�d�3�	
������s�+�S�1�	
����*�*�=�!�<�g�F�����+�+�M�1�=�w�G����,�3�3�M�Q�3�O�QX�Y����3�:�:�=�PR�^_�:�`�bn�o����3�:�:�=�PT�`c�:�d�fr�s�	
���*�c�j�j�1����*�c�j�j�1����*�d�k�k�2����*�d�k�k�2����*�d�k�k�2����*�d�k�k�2����*�e�l�l�3����*�e�l�l�E�:����(�e�l�l�3����*�d�k�k�2����*�j�&7�&7�8����*�d�k�k�2����*�f�m�m�4����*�f�m�m�Q�7����*�f�m�m�4����*�f�m�m�R�8����(�f�m�m�4����*�h�o�o�q�9����*�j�&7�&7��;����*�g�n�n�a�8����*�k�&8�&8�!�<����(�f�m�m�4����*�k�&8�&8�!�<����*�f�m�m�Q�7����(�g�n�n�!��<����*�g�n�n�a�8����*�f�m�m�Q�7����*�h�o�o�q�9����*�e�l�l�3����*�e�l�l�3����*�f�m�m�4����*�d�k�k�2�<�����*�s�S�y�3��&>�&>�?����*�t�c�z�D�'8�&@�&@�1�#�F�	
���*�g�n�n�b�9����*�g�n�n�c�:����*�g�n�n�b�9����*�g�n�n�c�:����*�g�n�n�b�9����*�g�n�n�c�:����*�g�n�n�b�9����*�g�n�n�c�:����*�g�n�n�b�9����*�g�n�n�c�:����*�g�n�n�b�9����*�g�n�n�c�:�	
���*�i�&6�&6���?����*�l�&9�&9�D�6�B�	
���)�Z�%6�%6�	�1�E�	
���*�m�&:�&:�E�3��K����*�&C�&J�&J��Q��1�a��A�q�	2�A�����z�8�X�_�_�b�I����z�8�V�R��E�B�	����z�9�f�m�m�R�H����*�h�o�o�r�:�	
���*�f�b�#�6����*�f�b�%�8�	
����,�,�U�4H�I�0�	2�����)�)�*A�B��	 �����)�)�*A�B��	�	
������$���3�S�9�������$���6��<��������s��4�c�:��������s��4�c�:��������s��4�c�:��������s��4�c�:����*�h�o�o�r�:����*�g�n�n�b�9����*�e�l�l�B�7�����-�-�c�"�5�7K�L�
�f�I��������q�)�9�5����)�V�]�]�A�6����)�T�[�[�!�4�
�f�I��������q�)�9�5�������q�)�9�5����)�T�[�[�!�4rc�T�|jdji�d�|jdji�d�|jdji�d�|jdji�d�|jdji�d�|jdji�d	�|jd
ji�d�|jdji�d
�Gd�dt�}|jdj|��d�|jdj|d���d�Gd�d�}|jdj|��d�Gd�d�}|jdjd|d�i�d�|jtdj�|jtdj�|jt
dji�|jt
dji�|jt
dji�|jt
dji�|jt
d ji�|jt
d!ji�|jt
d"jdd#i�|jt
d"jd�|jt
d$jd#d%d&��Gd'�d(�}|jtdji�|jtdjg�|jtdj|��y))Nr�r�r+r<r=r>r?r@rArBrCrDrEc��eZdZd�Zy)�,UnicodeTest.test_format_map.<locals>.Mappingc��|Sr1r�r5�keys  r�__missing__z8UnicodeTest.test_format_map.<locals>.Mapping.__missing__�s���
rN)r(r)r*r�rrr�Mappingr�����
rr�z{hello}r�z{a} {world})r�r�c��eZdZd�Zd�Zy)�4UnicodeTest.test_format_map.<locals>.InternalMappingc��ddi|_y)Nr�r��r,r9s rr6z=UnicodeTest.test_format_map.<locals>.InternalMapping.__init__�s
�� #�W�~��rc� �|j|Sr1r�r�s  r�__getitem__z@UnicodeTest.test_format_map.<locals>.InternalMapping.__getitem__�s���|�|�C�(�(rN)r(r)r*r6r�rrr�InternalMappingr��s��
.�
)rr�z{a}c��eZdZdd�Zd�Zy)�&UnicodeTest.test_format_map.<locals>.Cc��||_yr1rLrNs  rr6z/UnicodeTest.test_format_map.<locals>.C.__init__�rOrc��|Sr1rrQs  rrSz1UnicodeTest.test_format_map.<locals>.C.__format__�rTrNrUrVrrrrWr��rXrrWr�rSr�r�r�r�r�r�r�r�z{a} {}r�rc��eZdZd�Zy)�/UnicodeTest.test_format_map.<locals>.BadMappingc��ddzS)Nr�rrr�s  rr�z;UnicodeTest.test_format_map.<locals>.BadMapping.__getitem__�s����s�
rN)r(r)r*r�rrr�
BadMappingr��r�rr�)rT�
format_mapr�rhr�rr��ZeroDivisionError)r5r�r�rWr�s     r�test_format_mapzUnicodeTest.test_format_mapzs���������r�*�B�/��������+�S�1��������,�d�3�����)�)�"�-�t�4�����)�)�"�-�t�4�����)�)�"�-�t�4�����)�)�"�-�t�4�����*�*�2�.��6�	�d�	�	
����-�-�g�i�8�'�B�����1�1�'�G�2D�E�}�U�	)�	)�
	
����)�)�/�*;�<�g�F�	�	�
	
����.�.��q��u�~�>��E�	
���)�R�]�]�3����)�S�^�^�4����*�c�n�n�b�9����*�c�n�n�b�9����*�d�o�o�r�:����*�d�o�o�r�:����*�d�o�o�r�:����*�d�o�o�r�:�	
���*�d�o�o��a�y�A����*�d�o�o�s�;����*�h�&9�&9�!�1�;M�N�	�	�	
���(�E�$4�$4�b�9����)�U�%5�%5�r�:����+�U�-=�-=�z�|�Lrc��djtjdz�}|jt�5td|�}ddd�y#1swYyxYw)Nz.{}fr����Q�@�r�r\r]rhr�r5�
format_stringrWs   r�test_format_huge_precisionz&UnicodeTest.test_format_huge_precision�s>���
�
�c�k�k�A�o�6�
�
�
�
�z�
*��D�-�0�F�+�
*�
*���
A�Ac��djtjdz�}|jt�5td|�}ddd�y#1swYyxYw)Nz{}fr�r�r�r�s   r�test_format_huge_widthz"UnicodeTest.test_format_huge_width�s>�����S�[�[�1�_�5�
�
�
�
�z�
*��D�-�0�F�+�
*�
*�r�c��djtjdz�}|jt�5|jd�}ddd�y#1swYyxYw)Nz
{{{}:.6f}}r�r�r�r�s   r�test_format_huge_item_numberz(UnicodeTest.test_format_huge_item_number�sD��$�+�+�C�K�K�!�O�<�
�
�
�
�z�
*�"�)�)�$�/�F�+�
*�
*�s�A�Ac��Gd�d�}|jdjd�d�|jdjd�d�|jd	jd�d
�|jdj|d��d�|jdjd
dg�d�|jdjddd��d�|jdjdd
�d�|jdjdd�d�|jdjdd�d�|jtdjd
d�|jtd jd
d�|jtd!jd
d�|jtd"jd
d�|jd#jdd$�%�d&�|jd'jdd$�%�d(�|jd)jd
d*d+d�,�d-�|jd.jddd
d+�/�d0�y)1Nc��eZdZdd�Zd�Zy)�1UnicodeTest.test_format_auto_numbering.<locals>.Cc��||_yr1rLrNs  rr6z:UnicodeTest.test_format_auto_numbering.<locals>.C.__init__�rOrc��|Sr1rrQs  rrSz<UnicodeTest.test_format_auto_numbering.<locals>.C.__format__�rTrNrUrVrrrrWr��rXrrWr�r�r�z{:5}rrzs    r�z's'z{._x}z{[1]}r�r�rRz{[a]}r�r�4za{}b{}cr�a0b1cza{:{}}brz^10za    x     bza{:{}x}br�r��a0x14bz{}{1}z{1}{}z{:{1}}z{0:{}}z{f}{}�test)�f�test4z{}{f}�4testz{:{f}}{g}{}r��g)r�r�z 1g3z{f:{}}{}{g})r�r�z 14g)rTr�rhr)r5rWs  r�test_format_auto_numberingz&UnicodeTest.test_format_auto_numbering�s���	�	�	
������R��$�/�������s�+�W�5�������s�+�U�3��������"��.��5��������A��/��5�������Q�A��7��=�����)�)�!�Q�/��9�����)�)�#�u�5�~�F�����*�*�2�s�3�X�>�	
���*�g�n�n�a��;����*�g�n�n�a��;����*�h�o�o�q�!�<����*�h�o�o�q�!�<�	
�������V��4�g�>��������V��4�g�>�����-�-�a��c�Q�-�?��H�����-�-�a��a�3�-�?��Hrc��tjj|�|jddzd�|jddzd�|jddzd�|jdd	zd
�|jddzd�|jdd
zd�|jddzd�|jddzd�|jddzd�|jdddd�zd�|jdddd�zd�|jddzd �|jdd!zd"�|j	t
djd#�|jdd"zd"�|j	tdjd$�|j	td%jd&�|j	td'jd$�|jd(d)dizd*�|jd(d)dizd*�|jd(d)dizd*�|jd(d)dizd*�|jd(dd+d,�zd*�|jd(dd+d,�zd*�|jd-d.zd/�|jd0d.zd1�|jd2dzd*�|jd3d4zd5�|jd3d6zd7�|jd8d9zd:�|jd8d;zd5�|jd<d=zd>�|jd?d@zdA�|jddBzdB�GdC�dD�}|jdE|�zd �tdF�}tdG�}|jdH|zdF�|jdI|zdJ�|jdH|zdG�|jdI|zdK�|jdLdMzdB�|jdNdMzdO�GdP�dQ�}GdR�dS�}|dT�}|dU�}|jdVdWzdX�|jdYdZzd[�|jd\d]zd^�|jddUzd_�|jdV|zd`�|jdY|zda�|jd\|zdb�|jd|zd_�|jtdctjdVdd�|jtdetjdYdf�|jtdgtjd\dh�|jtditjdV|�|jtdjtjdVdk�|jtdltjdYdm�|jtdntjd\do�|jtdptjdqdk�|jtdrtjd'dm�|jtdstjdtdo�|jtdutjd|�Gdv�dw�}|�}	|jtdxtjdt|	�|jtdxtjd'|	�|jtdxtjdq|	�|jtdytjdV|	�|jtdytjdY|	�|jtdytjd\|	�y)zNz%s, %s)rnrn�abc, abcz%s, %s, %i, %f, %5.2f)rnrnr�r�r�zabc, abc, 1, 2.000000,  3.00)rnrnr����r�zabc, abc, 1, -2.000000,  3.00)rnrnr�r�g@zabc, abc, -1, -2.000000,  3.50)rnrnr�r�g��(\�@zabc, abc, -1, -2.000000,  3.57)rnrnr�r�g�(\�\�@z abc, abc, -1, -2.000000, 1003.57z%r, %r)rvrnz
b'abc', 'abc'z%r)�ሴu'ሴ'z%az'\u1234'z%(x)s, %(y)srnr�)rr)zabc, defu
%(x)s, %(ü)s)rrz%ci4r�i�u𡒃)rf�aau%.1ဲfgUUUUUU�?z%i�
...%(foo)s...rS�	...abc...r��rSr�z...%s...%s...%s...%s...)r�r�r�rnz...1...2...3...abc...z"...%%...%%s...%s...%s...%s...%s...z...%...%s...1...2...3...abc...z...%s...z%*s)r�rnz  abc)���rnzabc  z%*.*s)r�r�rnz   ab)r�r�rnz%i %*.*s)r�r�r�rnz10   abcz
%i%s %*.*s)r�r�r�r�rnz	103   abcr�c��eZdZd�Zy)�,UnicodeTest.test_formatting.<locals>.Wrapperc��y)Nr�rr9s rr:z4UnicodeTest.test_formatting.<locals>.Wrapper.__str__s��rN�r(r)r*r:rrr�Wrapperr�s��
 rr�%s�nan�infz%fz%F�NAN�INFz%.1suaé€z%.2suaéc��eZdZd�Zd�Zd�Zy)�.UnicodeTest.test_formatting.<locals>.PseudoIntc�$�t|�|_yr1�r[r3r4s  rr6z7UnicodeTest.test_formatting.<locals>.PseudoInt.__init__s
�� ��Z��
rc��|jSr1r2r9s r�__int__z6UnicodeTest.test_formatting.<locals>.PseudoInt.__int__����z�z�!rc��|jSr1r2r9s r�	__index__z8UnicodeTest.test_formatting.<locals>.PseudoInt.__index__rrN)r(r)r*r6r
rrrr�	PseudoIntr	s��
(�
"�
"rrc��eZdZd�Zd�Zy)�0UnicodeTest.test_formatting.<locals>.PseudoFloatc�$�t|�|_yr1)�floatr3r4s  rr6z9UnicodeTest.test_formatting.<locals>.PseudoFloat.__init__ s
��"�5�\��
rc�,�t|j�Sr1rr9s rr
z8UnicodeTest.test_formatting.<locals>.PseudoFloat.__int__"s���4�:�:��&rN)r(r)r*r6r
rrr�PseudoFloatrs��
*�
'rrgo���!	@�mz%xr
�2az%X�rlz%or��11r��6d�6D�155z,%x format: an integer is required, not floatr�z,%X format: an integer is required, not floatg�z�G�@z,%o format: an integer is required, not floatg�p=
ף�?z2%x format: an integer is required, not PseudoFloatz.%x format: an integer is required, not complexy@z.%X format: an integer is required, not complexy@z.%o format: an integer is required, not complexr�z1%u format: a real number is required, not complexz%uz1%i format: a real number is required, not complexz1%d format: a real number is required, not complexz%dz%c requires int or charc��eZdZd�Zd�Zy)�2UnicodeTest.test_formatting.<locals>.RaisingNumberc��td��)Nr[��RuntimeErrorr9s rr
z:UnicodeTest.test_formatting.<locals>.RaisingNumber.__int__;s
��"�5�)�)rc��td��)Nr�r"r9s rrz<UnicodeTest.test_formatting.<locals>.RaisingNumber.__index__=s
��"�7�+�+rN)r(r)r*r
rrrr�
RaisingNumberr :s��
*�
,rr%r[r�)rrB�test_formattingrTrhr^�__mod__r�rrr��operator�modr#)
r5rrrrr�pi�letter_mr%�rns
          rr&zUnicodeTest.test_formatting�s����2�2�B�B�4�H�����N�2�J�?����0�3J�J�Lj�k����0�3K�K�Ml�m����0�3N�N�Pp�q����0�3O�O�Qq�r����0�3R�R�Tv�w�����O�3�_�E������+�Z�8������+�[�9�����u�%�*@�@�*�M����*�%��-F�F�
�S��������1��������6����-����{�C������,�l�;����)�T�\�\�4�8����*�l�&:�&:�U�D����)�T�\�\�4�8�	
����E�%�=�8�+�F�����E�%�=�8�+�F�����E�%�=�8�+�F�����E�%�=�8�+�F�����%�c�+B�B�[�Q�����%�c�+B�B�K�P����2�]�B�D[�\����=�
�M�Oo�p�����e�+�[�9������+�W�5������,�g�6�����<�/��9�����<�/��9�����&6�6�
�C�����(=�=�{�K�������S�)�	 �	 �	
�����	�)�8�4��E�l���E�l��������U�+�������U�+�������U�+�������U�+�	
����-�/��5�����-�/��9�	"�	"�	'�	'�
��
 ���S�>��������D�)�������C�(�������4�(�������S�)�������$�/�������$�/�������%�0�������#�.����y�*X�Zb�Zf�Zf�hl�nr�s����y�*X�Zb�Zf�Zf�hl�nr�s����y�*X�Zb�Zf�Zf�hl�nr�s����y�*^�`h�`l�`l�nr�tv�w����y�*Z�\d�\h�\h�jn�pr�s����y�*Z�\d�\h�\h�jn�pr�s����y�*Z�\d�\h�\h�jn�pr�s����y�*]�_g�_k�_k�mq�su�v����y�*]�_g�_k�_k�mq�su�v����y�*]�_g�_k�_k�mq�su�v����y�*C�X�\�\�SW�Y[�\�	,�	,��_�����|�U�H�L�L�$��K����|�U�H�L�L�$��K����|�U�H�L�L�$��K����|�W�h�l�l�D�"�M����|�W�h�l�l�D�"�M����|�W�h�l�l�D�"�Mrc
��ddl}Gd�dt|j�}Gd�d|j�}Gd�d|j�}|j|j�d|j��d	�|jd
|j|j|j|j|j|j|jfzd�|jdd
|jizd�|jdd
|jizd�|jdd
|jizd�|jdd
|jizd�|jdd
|jizd�|jd|j|jd�zd�|jd|jdd�zd�y)Nrc��eZdZdZy)�4UnicodeTest.test_formatting_with_enum.<locals>.FloatgJ�M�!	@N)r(r)r*�PIrrr�Floatr/Ks���Brr1c��eZdZdZy)�2UnicodeTest.test_formatting_with_enum.<locals>.IntrN)r(r)r*�IDESrrr�Intr3Ns���Drr5c��eZdZdZy)�2UnicodeTest.test_formatting_with_enum.<locals>.StrrnN)r(r)r*r�rrr�Strr7Qs���Crr8z, r�z%s, %s, %d, %i, %u, %f, %5.2fz%abc, abc, 15, 15, 15, 3.141593,  3.14r�rSr�z
...%(foo)r...z...<Int.IDES: 15>...z...15...z
...%(foo)i...z
...%(foo)d...z
...%(foo)u...r�z
...%(foo)f...r�z...3.141593...)	�enumr�Enum�IntEnum�StrEnumrTr�r4r0)r5r9r1r5r8s     r�test_formatting_with_enumz%UnicodeTest.test_formatting_with_enumHs����	�E�4�9�9�	�	�$�,�,�	�	�$�,�,�	�	
���S�W�W�c�g�g�6�#�	%����8����#�'�'����3�8�8�S�X�X����5�8�8�-�-�A�		B�	
����E�#�'�'�?�:�$�	&�����E�#�(�(�+;�;�/�	1�����E�#�(�(�+;�;�#�	%�����E�#�(�(�+;�;�#�	%�����E�#�(�(�+;�;�#�	%�����#�(�(�%�(�(�+K�K�#�	%�����%�(�(��+E�E�)�	+rc��djtjdz�}|jt�5|dz}ddd�y#1swYyxYw�Nz%.{}fr�r�r�r�s   r�test_formatting_huge_precisionz*UnicodeTest.test_formatting_huge_precisionms<�����s�{�{�Q��7�
�
�
�
�z�
*�"�T�)�F�+�
*�
*���A�Ac�X�Gd�dt�}|jd|d�zd�y)Nc��eZdZd�Zy)�BUnicodeTest.test_issue28598_strsubclass_rhs.<locals>.SubclassedStrc�$�dj|�S)Nz'Success, self.__rmod__({!r}) was called�r�)r5�others  r�__rmod__zKUnicodeTest.test_issue28598_strsubclass_rhs.<locals>.SubclassedStr.__rmod__vs��@�G�G��N�NrN)r(r)r*rHrrr�
SubclassedStrrDus��
OrrIz	lhs %% %r�rhsz.Success, self.__rmod__('lhs %% %r') was called�rPrT)r5rIs  r�test_issue28598_strsubclass_rhsz+UnicodeTest.test_issue28598_strsubclass_rhsrs0��	O�C�	O�	
����}�U�';�;�I�	Krc��djtjdz�}|jt�5|dz}ddd�y#1swYyxYwr?)r�r��INT_MAXrhrr�s   r�'test_formatting_huge_precision_c_limitsz3UnicodeTest.test_formatting_huge_precision_c_limits{sA�� ���y�'8�'8�1�'<�=�
�
�
�
�z�
*�"�T�)�F�+�
*�
*�rAc��djtjdz�}|jt�5|dz}ddd�y#1swYyxYw)Nz%{}fr�r�r�r�s   r�test_formatting_huge_widthz&UnicodeTest.test_formatting_huge_width�s<���
�
�c�k�k�A�o�6�
�
�
�
�z�
*�"�T�)�F�+�
*�
*�rAc��djdjfD]b}|jt�5}|dg�ddd�t	j
�}|j
d|�|j
d|��dy#1swY�ExYw)NrSr�rPr�)�
startswith�endswithrhr�rP�	exceptionr0)r5r��cm�excs    r�test_startswith_endswith_errorsz+UnicodeTest.test_startswith_endswith_errors�sj���%�%�u�~�~�6�D��"�"�9�-���c�U��.��b�l�l�#�C��M�M�%��%��M�M�'�3�'�7�-�-�s�
A?�?B	�LC_ALL�de_DE�fr_FRc�.�|jdddz�y)Nz1.0z%.1fr��rTr9s r�test_format_floatzUnicodeTest.test_format_float�s��	
�������-rc	���|jtd�d�dD]�}t|�}|jt|�|�|jt|�t|��|dk(s�S|j|j	d�d�|j|j	d�d���|jtd�d�Gd�d�}|jt|d	��d	�|d
�}|jt|�d
�|jt|�d
�dD]/}|jt|�tt|����1|jttddd
�|jtddd
�d�|jttd�dd
�d�|jttddd�y)Nzunicode remains unicode)r�r r�r�r�sascii�utf-8z strings are converted to unicodec��eZdZd�Zd�Zy)�2UnicodeTest.test_constructor.<locals>.StringCompatc��||_yr1r\rNs  rr6z;UnicodeTest.test_constructor.<locals>.StringCompat.__init__�r]rc��|jSr1r\r9s rr:z:UnicodeTest.test_constructor.<locals>.StringCompat.__str__�s���v�v�
rNr<rrr�StringCompatrb�s��
�
rrez)__str__ compatible objects are recognizedz#unicode(obj) is compatible to str())r�g������^@r�z!decoding unicode is not supportedrsstrings are decoded to unicodezstrings are decoded to unicodes(character buffers are decoded to unicodez(character buffers are decoded to unicoder
)rTrPr&�lenr!rhr��
memoryview)r5r#�subclassre�o�objs      r�test_constructorzUnicodeTest.test_constructor�s���	
����)�*�%�	
�
>�D�"�4�(�H����S��]�D�1����S��]�C��I�6��w��� � �����!9�8�D�� � �����!9�8�D�
>�	
����2�3�.�	
�
	�	�	
�����H�I�J�7�	
�
�>�?������Q��!F�G�����Q��!F�G�%�C����S��X�s�3�s�8�}�5�&�	
�����/���	
�	
����1�7�H�E�,�	
�
	
�����F�G���
�

7�
	
�	
���)�S�"�b�"�5rc���|jtd��d�|jtdd��d�|jtdd��d�|jtdd��d�y	)
z>Pass various keyword argument combinations to the constructor.rS)rXsfoor`)rXrr�r)rXrN)rTrPr9s r�test_constructor_keyword_argsz)UnicodeTest.test_constructor_keyword_args�s^��	
����E�*�E�2�����F�W�=�u�E�����V�H�5�u�=�����F�8�<�e�Drc��|jt�d�|jtd��d�djd�}|jt|d��d�|jtt|d��y)	z(Check the constructor argument defaults.r�rrm�¢r`r�)rN)rTrPr!rh�UnicodeDecodeError)r5�	utf8_cents  r�test_constructor_defaultsz%UnicodeTest.test_constructor_defaults�sh��	
������#�����H�-�r�2��K�K��(�	�����Y�x�8�$�?����,�c�9�w��Orc��gd�}|D]&\}}|j|jd�|��(|jdjd�d�|jdjd�d�|jdjd�d�|jd	jd�d
�|jdjd�d�|jdjd�d�|jdjd�d�|jd
jd�d	�|jdjd�d�|jdjd�d�|jd
jdd�d�d}d}|D]b}|j|jd�|jd��|j|jd�jd�|��d|D]2}|j|jd�jd�|��4|jtd�5djd�ddd�y#1swYyxYw)N))uA≢Α.s	A+ImIDkQ.)u
Hi Mom -☺-!sHi Mom -+Jjo--!)u	日本語s
+ZeVnLIqe-)uItem 3 is £1.sItem 3 is +AKM-1.)�+s+-)z+-s+--�z+?s+-?)z\?s+AFw?rv)z\\?s+AFwAXA?)z\\\?s
+AFwAXABc?)z++--s+-+---)u򫳞s+2m/c3g-)�/�/�utf-7u�s+2AE-u�xs+2AE-xu�s+3AE-u�xs+3AE-xu�򫳞s
+2AHab9ze-s+�rur�zGABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'(),-./:?z!"#$%&*;<=>@[]^_`{|}�utf7r�zill-formed sequences+@)rTr!r"r�rq)r5�utfTestsrr)�set_d�set_ors       r�test_codecs_utf7zUnicodeTest.test_codecs_utf7�s��
��"�F�Q�����Q�X�X�g�.��2��	
�������1�8�<�����)�)�'�2�I�>��������1�8�<�����)�)�'�2�I�>��������1�8�<�����)�)�'�2�I�>��������1�8�<�����)�)�'�2�I�>����+�2�2�7�;�]�K�����-�-�g�6�8J�K�	
�������(�;�R�@�Z��&���A����Q�X�X�f�-�q�x�x��/@�A����Q�X�X�g�.�5�5�f�=�q�A���A����Q�X�X�g�.�5�5�f�=�q�A���
#�
#�$6�$9�;��L�L��!�;�;�;�s�I/�/I8c��|jdjd�d�|jdjd�d�|jdjd�d�|jdjd�d	�|jd
jdd�d�|jd
jdd�d�|jdjd�d�|jdjd�d�|jtd	d�d�|jtdd�d�|jtdd�d�y)Nr�r`rr�s€u𐀂s𐀂u𣑖s𣑖r��
surrogatepasss�u�s�u(𐀂𐀂𐀂𐀂𐀂𐀂𐀂𐀂𐀂𐀂s(𐀂𐀂𐀂𐀂𐀂𐀂𐀂𐀂𐀂𐀂u�正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git unds�正確に言うと翻訳はされていません。一部はドイツ語ですが、あとはでたらめです。実際には「Wenn ist das Nunstuck git und)rTr!rPr9s r�test_codecs_utf8zUnicodeTest.test_codecs_utf8s,��������7�+�S�1��������1�?�C�����,�,�W�5�7J�K�����,�,�W�5�7J�K��������/�B�O�T��������/�B�O�T����/�1�1�'�:�/�	1����
 �
!'��w��	
9�	
�(	
����0�'�:�L�J�����0�'�:�L�J�����_�g�6��Brc�b�gd�}|D]&\}}|j|jd�|��(y)N))�r,)�ar�)��)s€�€)s߿u߿)sࠀuࠀ)s퟿u퟿)su)s￿re)s𐀀r7)s􏿿r�r`)rTr")r5�	sequencesr`�ress    r� test_utf8_decode_valid_sequencesz,UnicodeTest.test_utf8_decode_valid_sequencesDs2��
�	�"�H�C�����S�Z�Z��0�#�6�"rc�v�tdd�D�cgc]}t|g���}}tdd�D�cgc]}t|g���}}tdd�D�cgc]}t|g���}}||z|ztdd�D�cgc]}t|g���c}z}|D]#}|jt|jd��%|D]-}|D]&}|jt||zjd��(�/|D]@}|dd	D]6}	|dd	D],}
|jt||	zd
z|
zjd��.�8�Btdd�D�cgc]}t|g���c}D]P}|jtd|zd
zjd�|jtd|zd
zjd��Rtdd�D�cgc]}t|g���c}D]P}|jtd|zd
zjd�|jtd|zd
zjd��Rtdd�D�cgc]}t|g���c}D]P}|jtd|zdzjd�|jtd|zdzjd��Rtdd�D�cgc]}t|g���c}D]P}|jtd|zdzjd�|jtd|zdzjd��Rycc}wcc}wcc}wcc}wcc}wcc}wcc}wcc}w)N�������r�r`r����������������s����)r�rXrhrqr")r5r�continuation_bytes�invalid_2B_seq_start_bytes�invalid_4B_seq_start_bytes�invalid_start_bytes�byte�sb�cb�cb1�cb3s           r�"test_utf8_decode_invalid_sequencesz.UnicodeTest.test_utf8_decode_invalid_sequencesUsV��27��d�2C�D�2C�Q�e�Q�C�j�2C��D�:?��d�:K�%L�:K�Q�e�Q�C�j�:K�"�%L�:?��d�:K�%L�:K�Q�e�Q�C�j�:K�"�%L��!;�;�&�
'�>C�D�%�>P�)Q�>P��%���*�>P�)Q�
R�	�
(�D����0�$�+�+�w�G�(�-�B�(���!�!�"4�r�"�u�n�n�g�N�)�-�-�B�)�"�1�-��-�b�q�1�C��%�%�&8�')�#�v�g�~�c�'9�&A�&A�7�L�2�.�-�(-�T�4�'8�9�'8�!�5�!��:�'8�9�B����0�&�r�z�'�1�9�9�7�
D����0�&�r�z�'�1�9�9�7�
D�:�(-�T�4�'8�9�'8�!�5�!��:�'8�9�B����0�&�r�z�'�1�9�9�7�
D����0�&�r�z�'�1�9�9�7�
D�:�
(-�T�4�'8�9�'8�!�5�!��:�'8�9�B����0�&�r�z�+�5�=�=�w�
H����0�&�r�z�+�5�=�=�w�
H�:�
(-�T�4�'8�9�'8�!�5�!��:�'8�9�B����0�&�r�z�+�5�=�=�w�
H����0�&�r�z�+�5�=�=�w�
H�:��OE��%L��%L��*R�� :��:��
:��
:s.�L�L�L�?L"�L'�;L,�2L1�)L6c���d}gd|f�d|dzf�d|f�d|dzf�d|f�d|dzf�d	|dzf�d
|f�d|dzf�d|d
zf�d|dzf�d|f�d|dzf�d|d
zf�d|dzf�d|f�d|dzf�d|dz|zf�d|dzf�d|dzf�d|dzdzf�d|dz|zf�d|f�d|dzf�d|d
zf�d |dzf�d!|d"zf�d#|f�d$|f�d%|dzf�d&|dzf�d'|dzf�d(|dz|zf�d)|dz|dzzf�d*|dz|zdzf�d+|dz|zf�d,|dz|zf�d-|dz|dzzf�d.|dzdzf�d/|dz|dzzf�d0|f�d1|dzf�d2|dzf�d3|d
zf�d4|dzf�d5|dzdzf�d6|dzdz|zf�d7|dz|dzzdzf�d8|f�d9|dzf�d:|dzf�d;|dzdzf�d<|d"zf�d=|f�d>|dzf�d?|d
zf�d@|dAzf�dB|f�dC|d
zf�dD�dE�dF�dG�}t|�D]�\}\}}|jt|jdHdI�|j	|jdHdJ�|�|j	|dKzjdHdJ�|dLz�|j	|jdHdM�|jddN����y)ON��r�r�r���s����s��s����s��s���r�s�ArZ��s��s���s����r�s�s�As�A�s�AA�AAs�As��As�A���s��s���s����s�����r�s�s�s�As�AAs�As�A�s�A��s�A�As�AA�s�A�s�A��s��As�A����s��s��s���s����s��As��A�s�A��A��s��s��s��As�������s��s���s������r���s���)s�ABCu�ABC)s�BCu��BC)s�Cu�C)s
a���b�c��dua���b�c��dr`rrc�br�rur�)�	enumeraterhrqr"rTrc)r5�FFFDr�r�r`r�s      r�test_issue8271zUnicodeTest.test_issue8271�s�����J
�
�d�O�J
��$�q�&�!�J
��d�O�	J
�
�$�q�&�!�J
��d�O�
J
��$�q�&�!�J
��$�q�&�!�J
��d�O�J
��$�q�&�!�J
��d�1�f�%�J
��$�s�(�#�J
��d�O�J
� �$�q�&�!�!J
�"�d�1�f�%�#J
�$!�$�q�&�)�%J
�&�$��'J
�(�$�s�(�#�)J
�*�d�3�h�t�m�,�+J
�,�d�4�i�(�-J
�.�d�3�h�'�/J
�0!�$�q�&��*�-�1J
�2!�$�s�(�4�-�0�3J
�6�d�O�7J
�8�$�q�&�!�9J
�:�d�1�f�%�;J
�<!�$�q�&�)�=J
�>%�d�1�f�-�?J
�@�$��AJ
�B�d�#�CJ
�D�d�3�h�'�EJ
�F!�$�t�)�,�GJ
�H!�$�s�(�+�IJ
�J�d�3�h�t�m�,�KJ
�L!�$�s�(�4��6�/�2�MJ
�N!�$�s�(�4�-��"3�4�OJ
�P!�$�t�)�D�.�1�QJ
�R!�$�s�(�4�-�0�SJ
�T!�$�s�(�4��6�/�2�UJ
�V!�$�q�&��*�-�WJ
�X!�$�s�(�4��6�/�2�YJ
�\�d�O�]J
�^�$�q�&�!�_J
�`�$�q�&�!�aJ
�b�d�1�f�%�cJ
�d!�$�q�&�)�eJ
�f�d�1�f�S�j�)�gJ
�h!�$�q�&��*�T�/�2�iJ
�j%�d�3�h�t�A�v�o�c�&9�:�kJ
�n�d�O�oJ
�p�$�q�&�!�qJ
�r�$�q�&�!�sJ
�t�d�1�f�s�l�+�uJ
�v%�d�1�f�-�wJ
�z�d�O�{J
�|�$�q�&�!�}J
�~�d�1�f�%�J
�@)�$�q�&�1�AJ
�D�d�O�EJ
�F�d�1�f�%�GJ
�J
<�KJ
�L
>�MJ
�N
8�OJ
�P
E�QJ
�	�V'�y�1�M�A�z��S����0�#�*�*�g�x�P����S�Z�Z���;�S�A����c�$�h�.�.�w�	�B�C��G�L����S�Z�Z���:� �[�[��2�6�
8�	2rc�,�|jt�5}|jd�ddd�j}|j	|t|��|j
|jdd�|�|j
d|zdzjdd�d|zdz�|jdd	�}|j
|jdd
�|�|j
d|zdzjdd
�d|zdz�y#1swY��xYw)z�
        Check that an invalid UTF-8 sequence raises a UnicodeDecodeError when
        'strict' is used, returns res when 'replace' is used, and that doesn't
        return anything when 'ignore' is used.
        r`Nrcsaaaasbbbb�aaaa�bbbbr�r�ru)rhrqr"rUr0rPrTrc)r5r`r��errrVrWs      r�assertCorrectUTF8Decodingz%UnicodeTest.assertCorrectUTF8Decoding�s����
�
�1�
2�b��J�J�w��3��l�l���
�
�c�3�s�8�$�������G�Y�7��=����'�C�-�'�1�9�9�'�9�M��#���.�	0��k�k�(�B�'��������G�X�6��<����'�C�-�'�1�9�9�'�8�L� �3�,��/�	1�3�
2�s�D
�
Dc�P�d}dD]}|jt|g�dd��!y)ah
        Test that an 'invalid start byte' error is raised when the first byte
        is not in the ASCII range or is not a valid start byte of a 2-, 3-, or
        4-bytes sequence. The invalid start byte is replaced with a single
        U+FFFD when errors='replace'.
        E.g. <80> is a continuation byte and can appear only after a start byte.
        r�s��������zinvalid start byteN)r�rX)r5r�r�s   r�test_invalid_start_bytez#UnicodeTest.test_invalid_start_byte�s/����7�D��*�*�5�$��=�(�+?�
A�8rc�j�gd�}d}|D](}|jtj|�dd��*y)aa
        Test that an 'unexpected end of data' error is raised when the string
        ends after a start byte of a 2-, 3-, or 4-bytes sequence without having
        enough continuation bytes.  The incomplete sequence is replaced with a
        single U+FFFD when errors='replace'.
        E.g. in the sequence <F3 80 80>, F3 is the start byte of a 4-bytes
        sequence, but it's followed by only 2 valid continuation bytes and the
        last continuation bytes is missing.
        Note: the continuation bytes must be all valid, if one of them is
        invalid another error will be raised.
        )&�C2�DFzE0 A0zE0 BFzE1 80zE1 BFzEC 80zEC BFzED 80zED 9FzEE 80zEE BFzEF 80zEF BFzF0 90zF0 BFzF0 90 80zF0 90 BFzF0 BF 80zF0 BF BFzF1 80zF1 BFzF1 80 80zF1 80 BFzF1 BF 80zF1 BF BFzF3 80zF3 BFzF3 80 80zF3 80 BFzF3 BF 80zF3 BF BFzF4 80zF4 8FzF4 80 80zF4 80 BFzF4 8F 80zF4 8F BFr�zunexpected end of dataN�r�rX�fromhex)r5r�r�r`s    r�test_unexpected_end_of_dataz'UnicodeTest.test_unexpected_end_of_data�s9��
�	����C��*�*�5�=�=��+=�x�+C�
E�rc	��d}|dz}d|dzfd|dzfd|fd|fd	|dzfd
|dzfd|fd|fg}|D]+\}}|jtj|�|d
��-y)a�
        Test that an 'invalid continuation byte' error is raised when the
        continuation byte of a 2-bytes sequence is invalid.  The start byte
        is replaced by a single U+FFFD and the second byte is handled
        separately when errors='replace'.
        E.g. in the sequence <C2 41>, C2 is the start byte of a 2-bytes
        sequence, but 41 is not a valid continuation byte because it's the
        ASCII letter 'A'.
        r�r�zC2 00r,zC2 7Fr�zC2 C0zC2 FFzDF 00zDF 7FzDF C0zDF FF�invalid continuation byteNr��r5r��FFFDx2r�r`r�s      r�test_invalid_cb_for_2bytes_seqz*UnicodeTest.test_invalid_cb_for_2bytes_seqs���������
�d�6�k�"�W�d�6�k�$:�
�f����0�
�d�6�k�"�W�d�6�k�$:�
�f����0�	
�	�"�H�C���*�*�5�=�=��+=�s�+F�
H�"rc��d}|dz}gd|dzf�d|dzf�d|f�d|f�d	|f�d
|f�d|dzf�d|dzf�d
|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d |dzf�d!|f�d"|f�d#|dzf�d$|dzf�d%|f�d&|f�d'|dzf�d(|dzf�d)|f�d*|f�d+|dzf�d,|dzf�d-|f�d.|f�d/|f�d0|f�d1|dzf�d2|dzf�d3|f�d4|f�d5|dzf�d6|dzf�d7|f�d8|f�d9|dzf�d:|dzf�d;|f�d<|f�d=|dzf�d>|dzf�d?|f�d@|f�dA|dzf�dB|dzf�dC|f�dD|f�dE|dzf�dF|dzf�dG|f�dH|f�dI|dzf�dJ|dzf�dK|f�dL|f�dM|dzf�dN|dzf�dO|f�dP|f�}|D]+\}}|jtj|�|dQ��-yR)Sa�
        Test that an 'invalid continuation byte' error is raised when the
        continuation byte(s) of a 3-bytes sequence are invalid.  When
        errors='replace', if the first continuation byte is valid, the first
        two bytes (start byte + 1st cb) are replaced by a single U+FFFD and the
        third byte is handled separately, otherwise only the start byte is
        replaced with a U+FFFD and the other continuation bytes are handled
        separately.
        E.g. in the sequence <E1 80 41>, E1 is the start byte of a 3-bytes
        sequence, 80 is a valid continuation byte, but 41 is not a valid cb
        because it's the ASCII letter 'A'.
        Note: when the start byte is E0 or ED, the valid ranges for the first
        continuation byte are limited to A0..BF and 80..9F respectively.
        Python 2 used to consider all the bytes in range 80..BF valid when the
        start byte was ED.  This is fixed in Python 3.
        r�r�zE0 00r,zE0 7Fr�zE0 80zE0 9FzE0 C0zE0 FFzE0 A0 00zE0 A0 7FzE0 A0 C0zE0 A0 FFzE0 BF 00zE0 BF 7FzE0 BF C0zE0 BF FFzE1 00zE1 7FzE1 C0zE1 FFzE1 80 00zE1 80 7FzE1 80 C0zE1 80 FFzE1 BF 00zE1 BF 7FzE1 BF C0zE1 BF FFzEC 00zEC 7FzEC C0zEC FFzEC 80 00zEC 80 7FzEC 80 C0zEC 80 FFzEC BF 00zEC BF 7FzEC BF C0zEC BF FFzED 00zED 7FzED A0zED BFzED C0zED FFzED 80 00zED 80 7FzED 80 C0zED 80 FFzED 9F 00zED 9F 7FzED 9F C0zED 9F FFzEE 00zEE 7FzEE C0zEE FFzEE 80 00zEE 80 7FzEE 80 C0zEE 80 FFzEE BF 00zEE BF 7FzEE BF C0zEE BF FFzEF 00zEF 7FzEF C0zEF FFzEF 80 00zEF 80 7FzEF 80 C0zEF 80 FFzEF BF 00zEF BF 7FzEF BF C0zEF BF FFr�Nr�r�s      r�test_invalid_cb_for_3bytes_seqz*UnicodeTest.test_invalid_cb_for_3bytes_seq-sQ��"������"
�
�d�6�k�"�"
�%,�d�6�k�$:�"
�=D�f�<M�"
�
�f��"
� '��0�"
�3:�F�2C�"
���f��%�"
�)3�D��K�'@�"
��� �	"
�$.�v�"6�	"
�
��f��%�"
�
)3�D��K�'@�"
��� �
"
�$.�v�"6�
"
�:A�$�v�+�8N�
"
��d�6�k�"�"
�&-�f�$5�"
�9@��7H�"
���f��%�"
�)3�D��K�'@�"
��� �"
�$.�v�"6�"
���f��%�"
�)3�D��K�'@�"
��� �"
�$.�v�"6�"
�:A�$�v�+�8N�"
��d�6�k�"�"
�&-�f�$5�"
�9@��7H�"
���f��%�"
�)3�D��K�'@�"
��� �"
�$.�v�"6�"
���f��%�"
�)3�D��K�'@�"
� �� �!"
� $.�v�"6�!"
� :A�$�v�+�8N�!"
�"�d�6�k�"�#"
�$�f��%"
�$!(��0�%"
�&�f��'"
�&!(��0�'"
�&4>�t�F�{�2K�'"
�(��f��%�)"
�()3�F�';�)"
�*�� �+"
�*$.�t�F�{�";�+"
�,��f��%�-"
�,)3�F�';�-"
�.�� �/"
�.$+�D��K�"8�/"
�0�d�6�k�"�1"
�0&-�f�$5�1"
�09@��7H�1"
�2��f��%�3"
�2)3�D��K�'@�3"
�4�� �5"
�4$.�v�"6�5"
�6��f��%�7"
�6)3�D��K�'@�7"
�8�� �9"
�8$.�v�"6�9"
�8:A�$�v�+�8N�9"
�:�d�6�k�"�;"
�:&-�f�$5�;"
�:9@��7H�;"
�<��f��%�="
�<)3�D��K�'@�="
�>�� �?"
�>$.�v�"6�?"
�@��f��%�A"
�@)3�D��K�'@�A"
�B�� �C"
�B$.�v�"6�C"
�	�F"�H�C���*�*�5�=�=��+=�s�+F�
H�"rc�f�d}|dz}gd|dzf�d|dzf�d|f�d|f�d	|f�d
|f�d|dzf�d|dzf�d
|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d|dzf�d|f�d|f�d|dzf�d |dzf�d!|f�d"|f�d#|dzf�d$|dzf�d%|f�d&|f�d'|dzf�d(|dzf�d)|f�d*|f�d+|dzf�d,|dzf�d-|f�d.|f�d/|dzf�d0|dzf�d1|f�d2|f�d3|dzf�d4|dzf�d5|f�d6|f�d7|dzf�d8|dzf�d9|f�d:|f�d;|dzf�d<|dzf�d=|f�d>|f�d?|dzf�d@|dzf�dA|f�dB|f�dC|dzf�dD|dzf�dE|f�dF|f�dG|dzf�dH|dzf�dI|f�dJ|f�dK|dzf�dL|dzf�dM|f�dN|f�dO|dzf�dP|dzf�dQ|f�dR|f�dS|dzf�dT|dzf�dU|f�dV|f�dW|dzf�dX|dzf�dY|f�dZ|f�d[|dzf�d\|dzf�d]|f�d^|f�d_|f�d`|f�da|dzf�db|dzf�dc|f�dd|f�de|dzf�df|dzf�dg|f�dh|f�di|dzf�dj|dzf�dk|f�dl|f�dm|dzf�dn|dzf�do|f�dp|f�dq|dzf�dr|dzf�ds|f�dt|f�du|dzf�dv|dzf�dw|f�dx|f�}|D]+\}}|jtj|�|dy��-yz){at
        Test that an 'invalid continuation byte' error is raised when the
        continuation byte(s) of a 4-bytes sequence are invalid.  When
        errors='replace',the start byte and all the following valid
        continuation bytes are replaced with a single U+FFFD, and all the bytes
        starting from the first invalid continuation bytes (included) are
        handled separately.
        E.g. in the sequence <E1 80 41>, E1 is the start byte of a 3-bytes
        sequence, 80 is a valid continuation byte, but 41 is not a valid cb
        because it's the ASCII letter 'A'.
        Note: when the start byte is E0 or ED, the valid ranges for the first
        continuation byte are limited to A0..BF and 80..9F respectively.
        However, when the start byte is ED, Python 2 considers all the bytes
        in range 80..BF valid.  This is fixed in Python 3.
        r�r�zF0 00r,zF0 7Fr�zF0 80zF0 8FzF0 C0zF0 FFzF0 90 00zF0 90 7FzF0 90 C0zF0 90 FFzF0 BF 00zF0 BF 7FzF0 BF C0zF0 BF FFzF0 90 80 00zF0 90 80 7FzF0 90 80 C0zF0 90 80 FFzF0 90 BF 00zF0 90 BF 7FzF0 90 BF C0zF0 90 BF FFzF0 BF 80 00zF0 BF 80 7FzF0 BF 80 C0zF0 BF 80 FFzF0 BF BF 00zF0 BF BF 7FzF0 BF BF C0zF0 BF BF FFzF1 00zF1 7FzF1 C0zF1 FFzF1 80 00zF1 80 7FzF1 80 C0zF1 80 FFzF1 BF 00zF1 BF 7FzF1 BF C0zF1 BF FFzF1 80 80 00zF1 80 80 7FzF1 80 80 C0zF1 80 80 FFzF1 80 BF 00zF1 80 BF 7FzF1 80 BF C0zF1 80 BF FFzF1 BF 80 00zF1 BF 80 7FzF1 BF 80 C0zF1 BF 80 FFzF1 BF BF 00zF1 BF BF 7FzF1 BF BF C0zF1 BF BF FFzF3 00zF3 7FzF3 C0zF3 FFzF3 80 00zF3 80 7FzF3 80 C0zF3 80 FFzF3 BF 00zF3 BF 7FzF3 BF C0zF3 BF FFzF3 80 80 00zF3 80 80 7FzF3 80 80 C0zF3 80 80 FFzF3 80 BF 00zF3 80 BF 7FzF3 80 BF C0zF3 80 BF FFzF3 BF 80 00zF3 BF 80 7FzF3 BF 80 C0zF3 BF 80 FFzF3 BF BF 00zF3 BF BF 7FzF3 BF BF C0zF3 BF BF FFzF4 00zF4 7FzF4 90zF4 BFzF4 C0zF4 FFzF4 80 00zF4 80 7FzF4 80 C0zF4 80 FFzF4 8F 00zF4 8F 7FzF4 8F C0zF4 8F FFzF4 80 80 00zF4 80 80 7FzF4 80 80 C0zF4 80 80 FFzF4 80 BF 00zF4 80 BF 7FzF4 80 BF C0zF4 80 BF FFzF4 8F 80 00zF4 8F 80 7FzF4 8F 80 C0zF4 8F 80 FFzF4 8F BF 00zF4 8F BF 7FzF4 8F BF C0zF4 8F BF FFr�Nr�r�s      r�test_invalid_cb_for_4bytes_seqz*UnicodeTest.test_invalid_cb_for_4bytes_seqgsP�� ������8
�
�d�6�k�"�8
�%,�d�6�k�$:�8
�=D�f�<M�8
�
�f��8
� '��0�8
�3:�F�2C�8
���f��%�8
�)3�D��K�'@�8
��� �	8
�$.�v�"6�	8
�
��f��%�8
�
)3�D��K�'@�8
��� �
8
�$.�v�"6�
8
��D��K�(�8
�,9�$�v�+�*F�8
��F�#�8
�'4�V�%<�8
��D��K�(�8
�,9�$�v�+�*F�8
��F�#�8
�'4�V�%<�8
��D��K�(�8
�,9�$�v�+�*F�8
��F�#�8
�'4�V�%<�8
��D��K�(�8
�,9�$�v�+�*F�8
��F�#�8
�'4�V�%<�8
��d�6�k�"�8
�&-�d�6�k�$:�8
�>E�f�<M�8
� �f��!8
� !+�D��K�8�!8
�"��f��%�#8
�")3�F�';�#8
�$�� �%8
�$$.�t�F�{�";�%8
�&��f��%�'8
�&)3�F�';�'8
�(�� �)8
�($1�$�v�+�">�)8
�*�D��K�(�+8
�*,9�&�*A�+8
�,�F�#�-8
�,'4�T�&�[�%A�-8
�.�D��K�(�/8
�.,9�&�*A�/8
�0�F�#�18
�0'4�T�&�[�%A�18
�2�D��K�(�38
�2,9�&�*A�38
�4�F�#�58
�4'4�T�&�[�%A�58
�6�D��K�(�78
�6,9�&�*A�78
�8�F�#�98
�8'.�t�F�{�%;�98
�:�d�6�k�"�;8
�:&-�f�$5�;8
�:9@��7H�;8
�<��f��%�=8
�<)3�D��K�'@�=8
�>�� �?8
�>$.�v�"6�?8
�@��f��%�A8
�@)3�D��K�'@�A8
�B�� �C8
�B$.�v�"6�C8
�D�D��K�(�E8
�D,9�$�v�+�*F�E8
�F�F�#�G8
�F'4�V�%<�G8
�H�D��K�(�I8
�H,9�$�v�+�*F�I8
�J�F�#�K8
�J'4�V�%<�K8
�L�D��K�(�M8
�L,9�$�v�+�*F�M8
�N�F�#�O8
�N'4�V�%<�O8
�P�D��K�(�Q8
�P,9�$�v�+�*F�Q8
�R�F�#�S8
�R'4�V�%<�S8
�T�d�6�k�"�U8
�T&-�d�6�k�$:�U8
�T>E�f�<M�U8
�V�f��W8
�V!(��0�W8
�V4;�F�2C�W8
�X��f��%�Y8
�X)3�D��K�'@�Y8
�Z�� �[8
�Z$.�v�"6�[8
�\��f��%�]8
�\)3�D��K�'@�]8
�^�� �_8
�^$.�v�"6�_8
�`�D��K�(�a8
�`,9�$�v�+�*F�a8
�b�F�#�c8
�b'4�V�%<�c8
�d�D��K�(�e8
�d,9�$�v�+�*F�e8
�f�F�#�g8
�f'4�V�%<�g8
�h�D��K�(�i8
�h,9�$�v�+�*F�i8
�j�F�#�k8
�j'4�V�%<�k8
�l�D��K�(�m8
�l,9�$�v�+�*F�m8
�n�F�#�o8
�n'4�V�%<�o8
�	�r"�H�C���*�*�5�=�=��+=�s�+F�
H�"rc�F�|jdjd�d�y)Nzwww.python.org.�idnaswww.python.org.)rTr!r9s r�test_codecs_idnazUnicodeTest.test_codecs_idna�s�����*�1�1�&�9�;M�Nrc��|jtdjd�|jtdjdd�|jdjdd�d�|jdjdd�d�|jdjdd�djdd���|jdjdd�djdd�	��|jttd
d�|jttd
dd�|jt	d
dd�d�|jt	d
dd�d�|jt	d
dd�d�|jdjdd�d�|jtdj
d�|jtdj
d�|jttdd�|jtdjd�|jtdjd�|jtdjddd�|jttd�|jttd�|jttd�|jttd�|jttd�|jttd�y)NuAndr‚ xr�rrusAndr xrcsAndr? xrm)rrsAndr� xzAndr xu	Andr� xs� xu� xs	\N{foo}xxzunicode-escape�xx�\�hellorrr�r
r�u�)rh�UnicodeErrorr!rTrPr"r�rr[r�complexr9s r�test_codecs_errorszUnicodeTest.test_codecs_errors�s`�����,��(;�(;�W�E����,��(;�(;�W�X�N�����,�,�W�X�>�	�J�����,�,�W�Y�?��L�����,�,�W�i�@�%�,�,�W�Y�,�G�	I�����,�,�W�h�?�%�,�,�g�h�,�O�	Q�	
���,��]�G�D����,��]�G�X�N�����]�G�X�>��I�����]�G�Y�?��P�����Y���;�Z�H�	
����-�-�.>��I�4�P�	
���,����6F�G����)�X�_�_�o�F����)�S�(�O�D����)�W�^�^�_�E����)�W�^�^�_�E�	
���)�W�^�^�R��R�@�	
���*�c�8�4����*�c�8�4����*�e�X�6����*�e�X�6����*�g�x�8����*�g�x�8rc��|jdjd�d�|jdjd�d�|jdjd�d�|jdjd�d�|jdjd�d�|jdjd�d	�|jdjd
�d�|jdj�d�td
�D]?}t|�}dD]-}|jt	|j|�|�|��/�Atd�D]?}t|�}dD]-}|jt	|j|�|�|��/�Atd�D]?}t|�}dD]-}|jt	|j|�|�|��/�Atj�5d}dD]-}|jt	|j|�|�|��/	ddd�djttttdd��ttdd��z��}dD]-}|jt	|j|�|�|��/y#1swY��xYw)Nr�r�r�ryr`�	utf-16-les
hello�	utf-16-bes
hello�latin-1u☃s☃i)ryr`�utf-16r�r��raw_unicode_escape�unicode_escaper�)r�r�)r�u𐀁𠀂𰀃񀀄񐀅)r`r�r�r�r�r�r�ri�i�rf)r`)
rTr!r�r�rPrx�catch_warningsr�r��list)r5rr�rs    r�test_codecszUnicodeTest.test_codecs�sM���������0�(�;��������0�(�;��������0�(�;��������0�(�;��������4�6R�S��������4�6R�S�������	�2�H�=�	
������*�O�<��t��A��A��A�/��� � ��Q�X�X�h�%7��!A�1�E�/���s��A��A��A�(��� � ��Q�X�X�h�%7��!A�1�E�)���s��A��A��A�&��� � ��Q�X�X�h�%7��!A�1�E�'���
$�
$�
&�D�A�E��� � ��Q�X�X�h�%7��!A�1�E�E�'�
�G�G�C��T�%��6�"2�3�!�%���"9�:�;�<�
=��"�H����S����(�!3�H�=�q�A�#�'�
&�s�5J<�<Kc��ttd��}dD]-}|jt||�j	|�|��/ttdd��}dD]-}|jt||�j	|�|��/y)Nr�)9�cp037�cp1026�cp273�cp437�cp500�cp720�cp737�cp775�cp850�cp852�cp855�cp858�cp860�cp861�cp862�cp863�cp865�cp866�cp1125�
iso8859_10�
iso8859_13�
iso8859_14�
iso8859_15�	iso8859_2�	iso8859_3�	iso8859_4�	iso8859_5�	iso8859_6�	iso8859_7�	iso8859_9�koi8_r�koi8_t�koi8_u�kz1048�latin_1�mac_cyrillic�
mac_latin2�cp1250�cp1251�cp1252�cp1253�cp1254�cp1255�cp1256�cp1257�cp1258�cp856�cp857�cp864�cp869�cp874�	mac_greek�mac_iceland�	mac_roman�mac_turkish�cp1006�	iso8859_8r�) r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr)rXr�rTrPr!)r5rrrs   r�test_codecs_charmapzUnicodeTest.test_codecs_charmap	s����%��*����H�2
���S��H�-�4�4�X�>��B�3�8
�%��S�/�"���H�*
���S��H�-�4�4�X�>��B�+rc��|jdd�|jdd�|jdd�|jdd�|jdd�y)Nr�rr]r9s r�test_concatenationzUnicodeTest.test_concatenationI	sT�����+��1����+��1����+��1����+�k�:����+�k�:rc��d}|jd�jd�}|j||�d}|jd�jd�}|j||�d}|jd�jd�}|j||�	djd�|jd�y#t$rB}|j|j
d�|j|jd�Yd}~yd}~wwxYw)	Nr6zraw-unicode-escapes
\U00100000s
\U00010000s
\U11111111z%Should have raised UnicodeDecodeErrorrr�)r!r"rT�failrq�start�end)r5rr)r�s    r�	test_ucs4zUnicodeTest.test_ucs4P	s�����
�H�H�)�*�1�1�2F�G������A����
�H�H�)�*�1�1�2F�G������A����
�H�H�)�*�1�1�2F�G������A��	?��!�!�"6�7�

�I�I�=�>��	"�	(����Q�W�W�a�(����Q�U�U�B�'�'��	(�s�C�	D�
8D�Dc	��Gd�dt�}|jttd��d�|jtttd���td��|jttd��td��|jtttd���td��|jttt	d���td��|jt|d��d�|jt|td���td��|jt|d��td��|jt|td���td��|jt|t	d���td��|jttd��d�|jtttd���td��|jttd��td��|jtttd���td��|jttt	d���td��y)Nc��eZdZd�Zd�Zy)�/UnicodeTest.test_conversion.<locals>.StrWithStrc�@�tj|d�}||_|S)Nr�)rP�__new__r3)r�r3r5s   rr%z7UnicodeTest.test_conversion.<locals>.StrWithStr.__new__g	s���{�{�3��+��"��
��rc��|jSr1r2r9s rr:z7UnicodeTest.test_conversion.<locals>.StrWithStr.__str__k	rrN)r(r)r*r%r:rrr�
StrWithStrr#f	s��
�
"rr'rnr�)rPrbr/r&r-r?)r5r's  r�test_conversionzUnicodeTest.test_conversiond	s��	"��	"�	
���c�'�%�.�1�5�9����c�'�+�e�*<�"=�>��E�@R�S����k�'�%�.�9�;�u�;M�N����k�'�+�e�2D�*E�F�)�%�0�	2����k�'�2B�5�2I�*J�K�)�%�0�	2�	
���c�*�U�"3�4�e�<����c�*�[��-?�"@�A�;�u�CU�V����k�*�U�*;�<�k�%�>P�Q����k�*�[��5G�*H�I�)�%�0�	2����k�*�5E�e�5L�*M�N�)�%�0�	2�	
���c�(�7�"3�4�g�>����c�(�;�w�+?�"@�A�;�w�CW�X����k�(�7�*;�<�k�'�>R�S����k�(�;�w�3G�*H�I�)�'�2�	4����k�(�3C�G�3L�*M�N�)�'�2�	4rc�X�Gd�d�}|jt|��d�y)Nc��eZdZd�Zy)�)UnicodeTest.test_unicode_repr.<locals>.s1c��y)N�\nrr9s rrBz2UnicodeTest.test_unicode_repr.<locals>.s1.__repr__�	s��rNrQrrr�s1r+�	s��
rr.r-�rTr�)r5r.s  r�test_unicode_reprzUnicodeTest.test_unicode_repr�	s$��	�	�	
����b�d��U�+rc�v�|jtd�ddz�|jtd�d�y)Nr7z'%c')�u𔀀z'\U00014000'r/r9s r�test_printable_reprzUnicodeTest.test_printable_repr�	s1������l�+�V�j�-@�A�����l�+�_�=r�Pr�z only applies to 32-bit platformsc�b�|jtdjtj�y)Nzt	t	)rhr^�
expandtabsr\r]r9s r�$test_expandtabs_overflows_gracefullyz0UnicodeTest.test_expandtabs_overflows_gracefully�	s ��	
���-��)<�)<�c�k�k�Jrc�H�d}|j|j�|�y)Nrn)r_r6)r5rrs  r�test_expandtabs_optimizationz(UnicodeTest.test_expandtabs_optimization�	s�����
�
�a�l�l�n�a�(rc��	�
�d}|dz}tj|�}tj|�}dD]��	t�	�}|dkrd}|}n|dkrd}|}n|dkrd}|}nd	}|}tj|z
|z�
�	�
fd
�}|j�	||��5|j
tj�	dz�||d
zz�|jt|�|jt|�ddd���y#1swY��xYw)N�nnb�nP)r�r r�r�r�r�r�r2r�r�c�����zSr1r)r��maxlens��r�<lambda>z0UnicodeTest.test_raiseMemError.<locals>.<lambda>�	s	���D�6�Mr)r��struct_size�	char_sizer
�+)
r�calcobjsizer&r\r]r�rT�	getsizeofrhr )r5�asciifields�
compactfields�ascii_struct_size�compact_struct_size�coderAr@�allocr�r>s         @@r�test_raiseMemErrorzUnicodeTest.test_raiseMemError�	s�����#�d�*�
�#�/�/��<��%�1�1�-�@��9�D��t�9�D��d�{��	�/������	�1������	�1���	�1���{�{�[�0�Y�>�F�)�E�����'�#���� � ��M�M�$��)�,��9��#7�8���!�!�+�u�5��!�!�+�u�5���':�&��s
�AC<�<D	c��Gd�dt�}|d�}|jd|zd�|jdj|�d�y)Nc��eZdZd�Zy)�+UnicodeTest.test_format_subclass.<locals>.Sc��y)N�__str__ overriddenrr9s rr:z3UnicodeTest.test_format_subclass.<locals>.S.__str__�	s��+rNrrrrr�rN�	s��
,rr��xxxrrPr�)rPrTr��r5r�rrs   r�test_format_subclassz UnicodeTest.test_format_subclass�	sG��	,��	,�
�e�H��������#7�8�������Q��)=�>rc��Gd�dt�}|j|d�|d�zd�Gd�dt�}|d�}|dz
}|j|d�y)Nc��eZdZd�Zy)�(UnicodeTest.test_subclass_add.<locals>.Sc��y�NrTr�r5ris  r�__add__z0UnicodeTest.test_subclass_add.<locals>.S.__add__�	���rN)r(r)r*rZrrrr�rV�	r�rr�r�r�rTc��eZdZd�Zy)rVc��yrXrrYs  r�__iadd__z1UnicodeTest.test_subclass_add.<locals>.S.__iadd__�	r[rN)r(r)r*r^rrrr�z(UnicodeTest.test_subclass_add.<locals>.S�	r�rrQrKrRs   r�test_subclass_addzUnicodeTest.test_subclass_add�	s\��	��	�	
����3��!�C�&��#�.�	��	�
�c�F��	�S�������C� rc��d}|j�}|j|d|�|j|d|�|jt|�d�y)Nrnrr�)�__getnewargs__�assertIsNotrTrf)r5r#rZs   r�test_getnewargszUnicodeTest.test_getnewargs�	sQ�����"�"�$������a��$�'�����a��$�'�����T��A�&rc��tddd�D]�}d|zdz}|jt�5tj|�}ddd�|j|�|dz
}|jt�5tj|�}ddd�|j
|�|j||���y#1swY�zxYw#1swY�<xYw)Nr�r�r�r�r�r)r��assertWarnsr�r��	getargs_urTrk)r5�lengthr#rnr�s     r�test_resizezUnicodeTest.test_resize�	s����A�s�A�&�F���<�#�%�D��!�!�"4�5��)�)�$�/��6����S�$�'�
�C�K�D��!�!�"4�5�"�,�,�T�2��6�����V�,����V�T�*�'�
6�5��6�5�s�B=�8C	�=C	�	C	c�L�d}d|z}d|z}d|z}d|z}d|z}d|z}d|z}d	|z}	||||||||	f}
tj|
d
�D]�\}}||u}
|j||k(|
�|j||k7|
�|
s�8|j||k�|j||k\�t	|�}t	|�}|j||�|j||k(�|j
||k7�|j||k�|j||k\���|j||k�|j||k�|j||k�|j||k�|j
||k\�|j
||k\�|j
||k\�|j
||k\�|j
||k�|j||k�|j||k�|j||k�|j||k\�|j
||k\�|j
||k\�|j
||k\�|j
||k�|j
||k�|j||k�|j||k�|j||k\�|j||k\�|j
||k\�|j
||k\�|j
||k�|j
||k�|j
||k�|j||	k�|j||k\�|j||k\�|j||k\�|j
||	k\�y)Nr�r�rr�rdr/rer6r�r�)�	itertools�combinationsrTrUr$rbr�)r5r�r��ascii2�latin�latin2�bmp�bmp2�astral�astral2�strings�text1�text2�equal�copy1�copy2s                r�test_comparezUnicodeTest.test_compare�	sk�����a����q�����
���!�����l���!�|����!����"���6��6����G�	��
&�2�2�7�A�>�L�E�5��e�^�E����U�e�^�U�3����U�e�^��Y�7��������/�������/�
)��/��(��/��� � ���.�������/�� � ��%��0�������/�������/�)?�,	
������'������
�&�������$�������'�����&��)�����%��(�����#��&�����&��)�������'�������'�������$�������'�������'�����&��)�����#��&�����&��)�����u��%�����u��%�����d�
�#�����f��%�����u��%�����u��%�������%�������'�����%��(�����%��(�����$��'������(�)�����%��(�����%��(�����$��'�����7�*�+rc��tj|tt�tj|tt�yr1)r�check_free_after_iteratingr�rP�reversedr9s r�test_free_after_iteratingz%UnicodeTest.test_free_after_iterating=
s&���*�*�4��s�;��*�*�4��3�?rc��d}d}tjd|�d|�d|�d|�d|�d|�d	|�d
��}tddd
|�}|j|jd|�y)N)r��utf8�latin1zBoom, Shaka Laka, Boom!z0
            import sys
            encodings = zn

            for data in (b'', b'short string'):
                try:
                    str(data, encoding=z�)
                except LookupError:
                    pass
                else:
                    sys.exit(21)

                try:
                    str(data, errors=z�)
                except LookupError:
                    pass
                else:
                    sys.exit(22)

                for encoding in encodings:
                    try:
                        str(data, encoding, errors=z�)
                    except LookupError:
                        pass
                    else:
                        sys.exit(22)

            for data in ('', 'short string'):
                try:
                    data.encode(encoding=z�)
                except LookupError:
                    pass
                else:
                    sys.exit(23)

                try:
                    data.encode(errors=z�)
                except LookupError:
                    pass
                else:
                    sys.exit(24)

                for encoding in encodings:
                    try:
                        data.encode(encoding, errors=z�)
                    except LookupError:
                        pass
                    else:
                        sys.exit(24)

            sys.exit(10)
        z-X�devz-cr�)�textwrap�dedentrrT�rc)r5�	encodings�invalidrI�procs     r�test_check_encoding_errorsz&UnicodeTest.test_check_encoding_errorsA
s���0�	�+�����$�"�
�&(�)0�{�3&�'.�[�14�5<�;�?*�+2��5(�)0�{�36�7>�[�A	�Y3 �3
��h%�T�5�$��=��������"�d�+r)wr(r)r*rPr'rKr]rbrlr�r�r�r�r�r�r�r�r�r�rr
r-r6r=rCrFrU�unittest�skipIfr\r]rargr�cpython_onlyrkrsr|r�r�r�r�r��requires_resourcer�r�r�r�r�r�r�r��requires_legacy_unicode_capir�r�r�r�r�rr
rrrr�
skipUnlessr"r4r:r�r�r�r�r�r�r&r=r@rLrOrQrX�run_with_localer^rkrnrsr~r�r�r�r�r�r�r�r�r�r�r�r�r�rrr r(r0r3�struct�calcsizer7r9rKrSr_rcrhryr}r��
__classcell__)r�s@rrErEIs���
�I�<�6�$+�,�)D�V*C�X3�2�<�A�8�7�<+H�Z'I�RR�0S�4DH�LM�";�(R�"S�"@�(�X�_�_�S�[�[�5�(�4�6�7�6�7�
@�.
���<��<�
.�,?�99�v
1�
1�
K�L��W���u�%�4�&�4�G�
1�1�
K�$
I�K�&
-�
���)�W�)�)�+��X�_�_�Y�$�&�(?�@�O�A�,��O�
5�O�65�,8�5�"H�"9�"D�4<��X������	�1�3K�L����
��M�
�%;�N	,�F5�P
5M�n1�
1�
0�
I�<hN�T#+�J*�
K�
����X�_�_�Y�$�&�(?�@�*�A��*�
*�
(��W���X�w��8�.�9�.�B6�HE�	P�1"�fC�J7�"-H�^W8�r1�&A�E�4H�,8H�tMH�^O�'9�R-B�^5C�n;�?�( 4�D,�>��X�_�_�S�[�[�G�,�I������0D��0I�7�9�K�9�K�
���)��)�$6�L?�
!�'�
���)�W�)�)�+��X�_�_�Y�$�&�(?�@�+�A�,��+�"H,�T@�:,rrEc��eZdZd�Zd�Zd�Zy)�StringModuleTestc�d�d�}|d�}|j|gd��|d�}|j|ddg�|d�}|j|dg�|d	�}|j|g�|d
�}|j|dg�|jttjd�y)
Nc�>�ttj|��Sr1)r��_string�formatter_parserrFs r�parsez5StringModuleTest.test_formatter_parser.<locals>.parse�
s����0�0��8�9�9rz2prefix {2!s}xxx{0:^+10.3f}{obj.attr!s} {z[0]!s:10}))�prefix rRr�rr)rQr�z^+10.3fN)r�zobj.attrr�rr)rgzz[0]r�rrzprefix {} suffix)r�r�r�N)z suffixNNNrP)rPNNNr�r�)r�r�r�Nr�)rTrhr�r�r�)r5r��	formatters   r�test_formatter_parserz&StringModuleTest.test_formatter_parser
s���	:��N�O�	�����%
�	��,�-�	�����%�)�%
�	�
�%�L�	�����%�%
�	��"�I�	�����B�'��%�L�	������%
�	�	
���)�W�%=�%=�q�Arc�,�d�}|j|d�dgg�|j|d�ddgg�|j|d�ddgg�|j|d�dgd�g�|jttjd	�y)
Nc�d�ttj|��}t|d�|d<|S)Nr�)r�r��formatter_field_name_split)rG�itemss  rr5z?StringModuleTest.test_formatter_field_name_split.<locals>.split�
s-����;�;�D�A�B�E��E�!�H�~�E�!�H��Lrrjzobj.arg�T�argzobj[key])Fr�zobj.arg[key1][key2])r�)F�key1)F�key2r�)rTrhr�r�r�)r5r5s  r�test_formatter_field_name_splitz0StringModuleTest.test_formatter_field_name_split�
s���	�	
����u���r�{�3�����y�)�E�M�?�+C�D�����z�*�U�^�4D�,E�F�����4�5��
�8�	�	
���)�W�%G�%G��Krc���td�}td�}Gd�d�}|�}|jt�5t||�ddd�t	||d�|j|jd�d|_|jt|j�|g�|jt�5t||�ddd�|jt�5|`	ddd�t	||d�|j|jd�d|_	|jt|j�||g�y#1swY��xYw#1swY��xYw#1swY�zxYw)	NrG�name2c��eZdZy)�4StringModuleTest.test_str_subclass_attr.<locals>.BagNr'rrr�Bagr��
r�rr�r�r�r�r�)
r&rh�AttributeError�delattr�setattrrTrGr��__dict__r�)r5rGr�r�ris     r�test_str_subclass_attrz'StringModuleTest.test_str_subclass_attr�
s���6�"���G�$��	�	�
�E��
�
�
�~�
.��A�t��/���4����������#��������a�j�j�)�D�6�2�
�
�
�~�
.��A�u��/�
�
�
�~�
.���/���5�!��������!�$��������a�j�j�)�D�%�=�9�/�
.��/�
.��
.�
.�s#�
E
�=
E�'E#�
E�E �#E,N)r(r)r*r�r�r�rrrr�r�~
s��B�BL� :rr��__main__)$�__doc__r�rGrjr(r�r�r\r�r�r�rx�test.supportrr�rr�test.support.script_helperrr��ImportErrorrr$rPr&r-r/r?r�rB�MixinStrUnicodeTest�TestCaserEr�r(�mainrrr�<module>r�s�����
���
�
�
�����(�&�<���
� "�	�#�	�	�s�	�����r(,�,�)�)��2�2��(�(����r(,�jQH:�x�(�(�H:�V�z���H�M�M�O���aU���I��s�C�C%�$C%

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