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

�KeR����ddlZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
Z
ddlZGd�de��Z
Gd�de��ZGd�de��ZGd�d	e��ZGd
�de��ZGd�d
e��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��Zej Gd �d!����Z!ej Gd"�d#����Z"ej d$�%��Gd&�d'����Z#ej Gd(�d)����Z$ej Gd*�d+����Z%ej Gd,�d-����Z&Gd.�d/��Z'Gd0�d1��Z(Gd2�d3ej)��Z*Gd4�d5ej+��Z,e-d6krej.��dSdS)7�Nc��eZdZdS)�list2N��__name__�
__module__�__qualname__���:/usr/local/apps/python3/lib/python3.11/test/test_pprint.pyrr��������Dr
rc��eZdZd�ZdS)�list3c�6�t�|��S�N)�list�__repr__��selfs rrzlist3.__repr__����}�}�T�"�"�"r
N�rrrrr	r
rrr�#������#�#�#�#�#r
rc��eZdZd�ZdS)�list_custom_reprc�V�dtt�|����zS�N�*)�lenrrrs rrzlist_custom_repr.__repr__�!���3�t�}�}�T�*�*�+�+�+�+r
Nrr	r
rrr�#������,�,�,�,�,r
rc��eZdZdS)�tuple2Nrr	r
rr!r!rr
r!c��eZdZd�ZdS)�tuple3c�6�t�|��Sr)�tuplerrs rrztuple3.__repr__s���~�~�d�#�#�#r
Nrr	r
rr#r#s#������$�$�$�$�$r
r#c��eZdZd�ZdS)�tuple_custom_reprc�V�dtt�|����zSr)rr%rrs rrztuple_custom_repr.__repr__#s!���3�u�~�~�d�+�+�,�,�,�,r
Nrr	r
rr'r'"s#������-�-�-�-�-r
r'c��eZdZdS)�set2Nrr	r
rr*r*&rr
r*c��eZdZd�ZdS)�set3c�6�t�|��Sr)�setrrs rrz
set3.__repr__*s���|�|�D�!�!�!r
Nrr	r
rr,r,)s#������"�"�"�"�"r
r,c��eZdZd�ZdS)�set_custom_reprc�V�dtt�|����zSr)rr.rrs rrzset_custom_repr.__repr__.s!���3�s�|�|�D�)�)�*�*�*�*r
Nrr	r
rr0r0-s#������+�+�+�+�+r
r0c��eZdZdS)�
frozenset2Nrr	r
rr3r31rr
r3c��eZdZd�ZdS)�
frozenset3c�6�t�|��Sr)�	frozensetrrs rrzfrozenset3.__repr__5s���!�!�$�'�'�'r
Nrr	r
rr5r54s#������(�(�(�(�(r
r5c��eZdZd�ZdS)�frozenset_custom_reprc�V�dtt�|����zSr)rr7rrs rrzfrozenset_custom_repr.__repr__9s#���3�y�)�)�$�/�/�0�0�0�0r
Nrr	r
rr9r98s#������1�1�1�1�1r
r9c��eZdZdS)�dict2Nrr	r
rr<r<<rr
r<c��eZdZd�ZdS)�dict3c�6�t�|��Sr)�dictrrs rrzdict3.__repr__@rr
Nrr	r
rr>r>?rr
r>c��eZdZd�ZdS)�dict_custom_reprc�V�dtt�|����zSr)rr@rrs rrzdict_custom_repr.__repr__Drr
Nrr	r
rrBrBCrr
rBc�`�eZdZUeed<eed<dZeed<ej	dd���Z
eed<dS)	�
dataclass1�field1�field2F�field3�)�default�repr�field4N)rrr�str�__annotations__�intrH�bool�dataclasses�fieldrLr	r
rrErEGsV��������K�K�K��K�K�K��F�D����#�+�#�A�E�:�:�:�F�C�:�:�:�:�:r
rEc�$�eZdZUdZeed<d�ZdS)�
dataclass2rI�ac��dS)N�0custom repr that doesn't fit within pprint widthr	rs rrzdataclass2.__repr__Qs��A�Ar
N)rrrrUrOrNrr	r
rrTrTNs7�������
�A�s�J�J�J�B�B�B�B�Br
rTF)rKc��eZdZUdZeed<dS)�
dataclass3rIrUN)rrrrUrOrNr	r
rrYrYTs�������
�A�s�J�J�J�J�Jr
rYc�(�eZdZUded<dZeed<dS)�
dataclass4rUrI�bN�rrrrNr\rOr	r
rr[r[X�&��������O�O�O�
�A�s�J�J�J�J�Jr
r[c�(�eZdZUded<dZeed<dS)�
dataclass5�
dataclass6rUrIr\Nr]r	r
rr`r`]r^r
r`c�(�eZdZUded<dZeed<dS)rar`�crI�dN)rrrrNrdrOr	r
rrarabr^r
rac��eZdZd�ZdS)�Unorderablec�:�tt|����Sr)rM�idrs rrzUnorderable.__repr__hs���2�d�8�8�}�}�r
Nrr	r
rrfrfgs#����������r
rfc�>�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	S)
�	Orderablec��||_dSr��_hash)r�hashs  r�__init__zOrderable.__init__ms
����
�
�
r
c��dS)NFr	�r�others  r�__lt__zOrderable.__lt__os���ur
c��||kSrr	rqs  r�__gt__zOrderable.__gt__q����u�}�r
c��||kSrr	rqs  r�__le__zOrderable.__le__srvr
c��dS)NTr	rqs  r�__ge__zOrderable.__ge__us���tr
c�
�||uSrr	rqs  r�__eq__zOrderable.__eq__ws���u�}�r
c�
�||uSrr	rqs  r�__ne__zOrderable.__ne__ys
���5� � r
c��|jSrrlrs r�__hash__zOrderable.__hash__{s
���z�r
N)rrrrorsrurxrzr|r~r�r	r
rrjrjls�������������������������!�!�!�����r
rjc�Z�eZdZd�Zd�Zd�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�Zd�Zd�Zd�Zd�Zd�Ze j!e"j#j$d�����Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*d$�Z+d%�Z,d&�Z-d'�Z.d(�Z/d)�Z0d*�Z1d+�Z2d,�Z3d-�Z4d.S)/�
QueryTestCasec��ttd����|_ttd����|_|j|jd<dS)N�d��i�)r�rangerUr\rs r�setUpzQueryTestCase.setUp�s=���e�C�j�j�!�!����e�C�j�j�!�!����f���s���r
c���tj��}tjdddtj��d���}tjdddtj����}tjd���}|�t
��5tjdddtj��d��}ddd��n#1swxYwY|�ttjd�	��|�ttjd
���|�ttjd���|�ttjd
���dS)
N��(�T)�indent�width�depth�stream�compactF��
sort_dicts����r�r�r��r�)�pprint�
PrettyPrinter�io�StringIO�assertRaises�	TypeError�
ValueError)r�pps  r�	test_initzQueryTestCase.test_init�s���
�
!�
#�
#��
�
!��"�A�)+�����F�F�F��
�
!�!�R��B�K�M�M�
:�
:��
�
!�U�
3�
3�
3��
�
�
�y�
)�
)�	E�	E��%�a��Q���
�
�t�D�D�B�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E����	E�	E�	E�	E����*�f�&:�2��F�F�F����*�f�&:�!��D�D�D����*�f�&:�"��E�E�E����*�f�&:�!��D�D�D�D�Ds�*C�C�Cc���tj��}dddddgdddidtd��d	d
dd|j|jfD]�}|�tj|��d|����|�tj|��d
|����|�|�|��d|����|�|�|��d
|������dS)N�g@y@�abc�)r�r�sdefsghiTF.�expected not isrecursive for �expected isreadable for )	r�r��	bytearrayrUr\�assertFalse�isrecursive�
assertTrue�
isreadable)rr��safes   r�
test_basiczQueryTestCase.test_basic�s6��
�
!�
#�
#����R����U�Q��F�F��v�&�&��e�T�3��V�T�V�%�	D�	D�D�
���V�/��5�5�5�BF�$�H�
J�
J�
J��O�O�F�-�d�3�3�3�<@�D�B�
D�
D�
D�
���R�^�^�D�1�1�1�BF�$�H�
J�
J�
J��O�O�B�M�M�$�/�/�/�<@�D�B�
D�
D�
D�
D�	D�	Dr
c���tjd��5d}tj|��tj���|��ddd��dS#1swxYwYdS)Nzthis should not fail)�
contextlib�redirect_stdoutr�r�)r�values  r�test_stdout_is_Nonez!QueryTestCase.test_stdout_is_None�s���
�
'��
-�
-�	1�	1�*�E��M�%� � � �� �"�"�)�)�%�0�0�0�		1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�	1�	1s�=A�A#�&A#c�(�|j|jd<i|_|jx|jd<x|jd<|jd<tj��}|j|j|j|j|jffD]�}|�tj|��d��|�tj|��d��|�|�|��d��|�|�|��d����|j�	��|jdd�=|jdd�=|j|j|j|j|jffD]�}|�tj|��d|����|�tj|��d|����|�|�|��d|����|�|�|��d|������dS)	N�CrrIr�zexpected isrecursivezexpected not isreadabler�r�)
rUr\rdr�r�r�r�r�r��clear)rr��ickyr�s    r�test_knottedzQueryTestCase.test_knotted�s-���V���r�
����,0�F�2���q�	�2�D�F�1�I���q�	�
�
!�
#�
#���F�D�F�D�F�T�V�T�V�,<�<�	M�	M�D��O�O�F�.�t�4�4�6L�M�M�M����V�.�t�4�4�6O�P�P�P��O�O�B�N�N�4�0�0�2H�I�I�I����R�]�]�4�0�0�2K�L�L�L�L�	
��������F�1�1�1�I��F�1�1�1�I��F�D�F�D�F�T�V�T�V�,<�<�
	D�
	D�D����V�/��5�5�5�BF�$�H�
J�
J�
J��O�O�F�-�d�3�3�3�<@�D�B�
D�
D�
D�
���R�^�^�D�1�1�1�BF�$�H�
J�
J�
J��O�O�B�M�M�$�/�/�/�<@�D�B�
D�
D�
D�
D�
	D�
	Dr
c���tj��}td��ttjfD]�}|�tj|��d|����|�tj|��d|����|�|�|��d|����|�|�|��d|������dS)Nr�r�zexpected not isreadable for )r�r��typer�r�r�)rr��
unreadables   r�test_unreadablezQueryTestCase.test_unreadable�s��
�
!�
#�
#���q�'�'�6�6�+=�=�
	O�
	O�J����V�/�
�;�;�;�BL�*�N�
P�
P�
P����V�.�z�:�:�:�AK��M�
O�
O�
O�
���R�^�^�J�7�7�7�BL�*�N�
P�
P�
P����R�]�]�:�6�6�6�AK��M�
O�
O�
O�
O�
	O�
	Or
c���gd�d�d�d�d�d�t���d�t���t���g�t���t	���t���t
���t���t���t���t���i�t���t���|j
�t�d�d�d�d	�d
�d�td���d�d
g�d
di�d�d
dg�ddi�td���td���ttd�����d
dg�td
dg���t	d
dg���t	td�����tdh���t
dh���tdh���tdh���tdh���tdh���tddi���tddi���tddd���d�d�d�d�RD]�}t!|��}|�tj|��|��|�tj|dd����dd��|��|�tj|d���|��|�tj|��|����dS) Nryg�r
r	i����y��g���x�x�r�r��)rIr�r�r�r����
i����r�TF.rI�r�r��
� ��underscore_numbers)r�r!r#rrr.r*r,r7r3r5r<r>r�r�r�rK�assertEqual�pformat�replace�saferepr)r�simple�natives   r�test_same_as_reprzQueryTestCase.test_same_as_repr�s����q��!��T��3����C��������!�8�8��%+�X�X���� �7�7��$)�G�G���u�u��#�f�f��'+�f�f��!�{�{�	�%/�L�L�	�3=�,�,�	�
��
!�7�7��
%*�G�G����
�)/�
����� %��'+��-0��26��8A������� �S��$%�a�&���� !��e��'(��V���e�}�}��'-�U�m�m��6<�E�#�J�J�5G�5G���!�u��$�Q�q�E�l�l��-2�1�Q�%�L�L��;@��c�
�
�:K�:K���A�3�x�x��"&�q�c����-1�!��I�I��!�!��~�~��(2�1�#����9C�A�3�����a��V�}�}��',�Q��F�m�m���R��b�)�)�� �!� #�!� %)�!� +.�!��	>�	>�F�$�&�\�\�F����V�^�F�3�3�V�<�<�<����V�^�F�!�A�F�F�F�%�g�d�C�0�0�&�
:�
:�
:����V�^�F�t�L�L�L�f�U�U�U����V�_�V�4�4�f�=�=�=�=�/	>�	>r
c��d}t��tgd���tt|����t��tgd���tt|����t��tgd���tt|����t	��t	gd���t	t|����t��tddi��tt
t|��t|������fD]�}t|��}dt|��z}|�	tj|��|��|�	tj|dd���|��|�	tj|��|����dS)	N��)rIr�r�r�r�rrIrr�)
rr�r'r0r9rB�ziprKrr�r�r�r�)r�N�contr��expecteds     r�#test_container_repr_override_calledz1QueryTestCase.test_container_repr_override_called�s�����&�'�'�%�g�g�g�.�.�%�e�A�h�h�/�/�&�(�(�&�w�w�w�/�/�&�u�Q�x�x�0�0�$�&�&�$�W�W�W�-�-�$�U�1�X�X�.�.�*�,�,�*�7�7�7�3�3�*�5��8�8�4�4�%�'�'�%�q�!�f�-�-�%�c�%��(�(�5��8�8�&<�&<�=�=��	>�	>�D� �$�Z�Z�F��S��[�[�(�H����V�^�D�1�1�8�<�<�<����V�^�D��!�D�D�D�h�O�O�O����V�_�T�2�2�H�=�=�=�=�)	>�	>r
c��dddddddd�}d}ttfD]3}|�tj||����|���4td��}dd�tt|����z}ttfD]3}|�tj||����|���4ttd����}d	d�tt|����z}ttfD]3}|�tj||����|���4td��}d
d�tt|����z}ttfD]5}|�tj||��d�
��|���6dS)Nri��i��)�RPM_cal�RPM_cal2�	Speed_cal�controldesk_runtime_us�main_code_runtime_us�read_io_runtime_us�write_io_runtime_usz�{'RPM_cal': 0,
 'RPM_cal2': 48059,
 'Speed_cal': 0,
 'controldesk_runtime_us': 0,
 'main_code_runtime_us': 0,
 'read_io_runtime_us': 0,
 'write_io_runtime_us': 43690}r�z[%s]�,
 z(%s)z[   %s]z,
    r�r�)
r@r<r�r�r�r��join�maprMrrr%r!)r�o�expr�s    r�test_basic_line_wrapz"QueryTestCase.test_basic_line_wraps������'(�%&�#$�$)�

+�
+��"���5�M�	;�	;�D����V�^�D�D��G�G�4�4�c�:�:�:�:��#�J�J���v�{�{�3�s�A�;�;�/�/�/���5�M�	;�	;�D����V�^�D�D��G�G�4�4�c�:�:�:�:��%��*�*�����v�{�{�3�s�A�;�;�/�/�/���F�O�	;�	;�D����V�^�D�D��G�G�4�4�c�:�:�:�:�
�#�J�J���)�.�.��S�!���5�5�5���5�M�	E�	E�D����V�^�D�D��G�G�A�>�>�>��D�D�D�D�	E�	Er
c��ttd����}tddd���}||g}d}|�t	j|dd�	��|��d
}|�t	j|dd�	��|��dS)Nr�rIr�r�)�first�second�thirdzN[   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
    {'first': 1, 'second': 2, 'third': 3}]r��*)r�r�za[   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
    {   'first': 1,
        'second': 2,
        'third': 3}]�))rr�r@r�r�r�)r�o1�o2r�r�s     r�test_nested_indentationsz&QueryTestCase.test_nested_indentations;s���
�%��)�)�_�_��
��!�1�
-�
-�
-��
��H��.��	
������!�2�>�>�>��I�I�I���
	
������!�2�>�>�>��I�I�I�I�Ir
c�x�d}t|��}|�tj|d���|��|�tj|d���|��|�tj|d���|��|�tj|d���d��dS)Nz�[[[[[[1, 2, 3],
     '1 2']]]],
 {1: [1, 2, 3],
  2: [12, 34]},
 'abc def ghi',
 ('ab cd ef',),
 set2({1, 23}),
 [[[[[1, 2, 3],
     '1 2']]]]]�r����z�[[[[[[1,
      2,
      3],
     '1 '
     '2']]]],
 {1: [1,
      2,
      3],
  2: [12,
      34]},
 'abc def '
 'ghi',
 ('ab cd '
  'ef',),
 set2({1,
       23}),
 [[[[[1,
      2,
      3],
     '1 '
     '2']]]]])�evalr�r�r�)rr�r�s   r�
test_widthzQueryTestCase.test_widthJs���	��
��N�N���������4�4�4�h�?�?�?��������4�4�4�h�?�?�?��������4�4�4�h�?�?�?��������4�4�4�7�	�	�	�	�	r
c�8��|�tjd��d��|�tjdd���d��G�fd�dt���|�tj�d����d	��dS)
Ni���1234567Tr��	1_234_567c�(���eZdZ��fd�Zd�Z�xZS)�/QueryTestCase.test_integer.<locals>.Temperaturec�H��t����|��Sr)�super�__new__)�cls�celsius_degrees�Temperature�	__class__s  ��rr�z7QueryTestCase.test_integer.<locals>.Temperature.__new__us����w�w���{�O�D�D�Dr
c��|dz}|�d�S)Ngfffffq@u°Kr	)r�kelvin_degreess  rrz8QueryTestCase.test_integer.<locals>.Temperature.__repr__ws��!%����(�-�-�-�-r
)rrrr�r�
__classcell__)rr�s@�rr�r�tsS��������
E�
E�
E�
E�
E�
E�
.�
.�
.�
.�
.�
.�
.r
r�r�u
1273.15°K)r�r�r�rO)rr�s @r�test_integerzQueryTestCase.test_integerps����������0�0�)�<�<�<�������D�I�I�I�;�W�W�W�	.�	.�	.�	.�	.�	.�	.�#�	.�	.�	.�	
�������D�(9�(9�:�:�L�I�I�I�I�Ir
c��dddd�}|�tj|��d��|�tj||g��d��|�tjdggid���d��dS)NrI�rUr\rcz{'a': 1, 'b': 1, 'c': 1}z4[{'a': 1, 'b': 1, 'c': 1}, {'a': 1, 'b': 1, 'c': 1}]r�)zxy	ab
r�r	z#{5: [[]], 'xy\tab\n': (3,), (): {}})r�r�r��rrds  r�test_sorted_dictzQueryTestCase.test_sorted_dict|s���
�!�!�$�$��������*�*�,F�G�G�G�������A��/�/�B�	D�	D�	D�	
�����T�r�d��(K�(K�L�L�2�	4�	4�	4�	4�	4r
c���t�d��}|�tj|d���d��|�tj||gd���d��dS)N�cbaFr�z!{'c': None, 'b': None, 'a': None}zF[{'c': None, 'b': None, 'a': None}, {'c': None, 'b': None, 'a': None}])r@�fromkeysr�r�r�rs  r�test_sort_dictzQueryTestCase.test_sort_dict�sx���M�M�%� � ��������e�<�<�<�>a�b�b�b�������A��5�A�A�A�T�	V�	V�	V�	V�	Vr
c���tj��}|�tj|d���d��tjg��}|�tj|d���d��d���}tjt
|tj������}|�tj|��d��dS)NrIr�z
OrderedDict()�*the quick brown fox jumped over a lazy dogz�OrderedDict([('the', 0),
             ('quick', 1),
             ('brown', 2),
             ('fox', 3),
             ('jumped', 4),
             ('over', 5),
             ('a', 6),
             ('lazy', 7),
             ('dog', 8)]))	�collections�OrderedDictr�r�r��splitr��	itertools�count�rrd�wordss   r�test_ordered_dictzQueryTestCase.test_ordered_dict�s����#�%�%���������3�3�3�_�E�E�E��#�B�'�'���������3�3�3�_�E�E�E�<�B�B�D�D���#�C��y��/@�/@�$A�$A�B�B��������*�*�	�
	�
	�
	�
	�
	r
c���d���}tt|tj������}tj|��}|�tj	|��d��tjt|tj������}tj|��}|�tj	|��d��dS)Nrz�mappingproxy({'a': 6,
              'brown': 2,
              'dog': 8,
              'fox': 3,
              'jumped': 4,
              'lazy': 7,
              'over': 5,
              'quick': 1,
              'the': 0})a^mappingproxy(OrderedDict([('the', 0),
                          ('quick', 1),
                          ('brown', 2),
                          ('fox', 3),
                          ('jumped', 4),
                          ('over', 5),
                          ('a', 6),
                          ('lazy', 7),
                          ('dog', 8)])))rr@r�rr�types�MappingProxyTyper�r�r�rr)rrrd�ms    r�test_mapping_proxyz QueryTestCase.test_mapping_proxy�s���<�B�B�D�D����U�I�O�-�-�.�.�/�/���"�1�%�%��������*�*�	-�		�		�		�
�#�C��y��/@�/@�$A�$A�B�B���"�1�%�%��������*�*�	-+�		,�		,�		,�		,�		,r
c��tj��}tj|��}|�|d��dS)Nznamespace()�r�SimpleNamespacer�r�r��r�ns�	formatteds   r�test_empty_simple_namespacez)QueryTestCase.test_empty_simple_namespace�s;��
�
"�
$�
$���N�2�&�&�	�����M�2�2�2�2�2r
c��tjdd���}tj|��}|�|d��dS)NrIr�)rUr\znamespace(a=1, b=2)rrs   r�test_small_simple_namespacez)QueryTestCase.test_small_simple_namespace�sC��
�
"�Q�!�
,�
,�
,���N�2�&�&�	�����$9�:�:�:�:�:r
c��tjddddddddd	�
�	�	}tj|dd���}|�|d
��dS)NrrIr�r�r�r�r�r�r��	�the�quick�brown�fox�jumped�overrU�lazy�dog�<r�z�namespace(the=0,
          quick=1,
          brown=2,
          fox=3,
          jumped=4,
          over=5,
          a=6,
          lazy=7,
          dog=8)rrs   r�test_simple_namespacez#QueryTestCase.test_simple_namespace�su��
�
"����������

�

�

���N�2�R��:�:�:�	�����	%�		�		�		�		�		r
c��Gd�dtj��}|ddddddd	d
d��	�	}tj|d
���}|�|d��dS)Nc��eZdZdS)�GQueryTestCase.test_simple_namespace_subclass.<locals>.AdvancedNamespaceNrr	r
r�AdvancedNamespacer3�s�������r
r4rrIr�r�r�r�r�r�r�r&r/r�z�AdvancedNamespace(the=0,
                  quick=1,
                  brown=2,
                  fox=3,
                  jumped=4,
                  over=5,
                  a=6,
                  lazy=7,
                  dog=8)r)rr4r r!s    r�test_simple_namespace_subclassz,QueryTestCase.test_simple_namespace_subclass�s���<�<�<�<�<�� 5�<�<�<�
�
����������

�

�

���N�2�R�0�0�0�	�����	%�		�		�		�		�		r
c��tjdd����}tj|��}|�|d��dS)N�MyDataclassr	z
MyDataclass())rQ�make_dataclassr�r�r��r�dcr!s   r�test_empty_dataclassz"QueryTestCase.test_empty_dataclass�sG��
:�[�
'�
�r�
:�
:�
<�
<���N�2�&�&�	�����O�4�4�4�4�4r
c�z�tdd��}tj|��}|�|d��dS)N�text�{z3dataclass1(field1='text', field2=123, field3=False))rEr�r�r�r9s   r�test_small_dataclassz"QueryTestCase.test_small_dataclasss=��
���
$�
$���N�2�&�&�	�����$Y�Z�Z�Z�Z�Zr
c��tdtd��d��}tj||gdd���}|�|d��dS)Nzsome fairly long textg _�BTr/r�r�z�[   dataclass1(field1='some fairly long text',
               field2=10000000000,
               field3=True),
    dataclass1(field1='some fairly long text',
               field2=10000000000,
               field3=True)])rErOr�r�r�r9s   r�test_larger_dataclassz#QueryTestCase.test_larger_dataclasss]��
�/��T���D�
A�
A���N�B��8�2�a�@�@�@�	�����% �	!�	!�	!�	!�	!r
c�z�t��}tj|d���}|�|d��dS)N�r�rW)rTr�r�r�r9s   r�test_dataclass_with_reprz&QueryTestCase.test_dataclass_with_reprs<��
�\�\���N�2�R�0�0�0�	�����$V�W�W�W�W�Wr
c�z�t��}tj|d���}|�|d��dS)Nr�r�z+<test.test_pprint.dataclass3 object at \w+>)rYr�r��assertRegexr9s   r�test_dataclass_no_reprz$QueryTestCase.test_dataclass_no_reprs<��
�\�\���N�2�R�0�0�0�	�����$R�S�S�S�S�Sr
c��td��}||_tj|d���}|�|d��dS)Nr�r�z!dataclass4(a=...,
           b=1))r[rUr�r�r�r9s   r�test_recursive_dataclassz&QueryTestCase.test_recursive_dataclasssS��
��
�
������N�2�R�0�0�0�	�����%�	�	�	�	�	r
c��td��}td��}||_||_t	j|d���}|�|d��dS)Nr�r�zLdataclass5(a=dataclass6(c=...,
                        d=1),
           b=1))r`rarUrcr�r�r�)r�dc5�dc6r!s    r�test_cyclic_dataclassz#QueryTestCase.test_cyclic_dataclass$sg�������������������N�3�b�1�1�1�	�����%�	�	�	�	�	r
c�:�ddd�}d}t��}|�|�|��|��dg}d}|�|�|��|��dg}d}|�|�|��|��dS)	Nz should be presented using repr()z	like.this)znames with spaceszothers.should.not.bez[{'names with spaces': 'should be presented using repr()',
 others.should.not.be: like.this}z
with spacez['with space']z
without.spacez[without.space])�DottedPrettyPrinterr�r�)rr�r��dotted_printerr��exp1r��exp2s        r�test_subclassingzQueryTestCase.test_subclassing/s���"D�%0�
2�
2��%��-�.�.������/�/��2�2�C�8�8�8��^��������/�/��3�3�T�:�:�:��
�� ������/�/��3�3�T�:�:�:�:�:r
c	��|�tjt����d��|�tjtt	d������d��|�tjtt	d����d���d��|�tjtt	d����d���d��|�tjt
t	d����d���d	��|�tjt����d
��|�tjtt	d������d��|�tjtt	d����d���d��|�tjtt	d����d���d
��|�tjtt	d����d���d��dS)Nzset()r�z	{0, 1, 2}r�rCr�z{0,
 1,
 2,
 3,
 4,
 5,
 6}z?set2({0,
      1,
      2,
      3,
      4,
      5,
      6})zset3({0, 1, 2, 3, 4, 5, 6})zfrozenset()zfrozenset({0, 1, 2})zbfrozenset({0,
           1,
           2,
           3,
           4,
           5,
           6})zifrozenset2({0,
            1,
            2,
            3,
            4,
            5,
            6})z!frozenset3({0, 1, 2, 3, 4, 5, 6}))
r�r�r�r.r�r*r,r7r3r5rs r�test_set_reprszQueryTestCase.test_set_reprsBs!����������.�.��8�8�8�������E�!�H�H�
�
�6�6��D�D�D�������E�!�H�H�
�
�R�@�@�@�C�	�	�	�	
������U�1�X�X���b�A�A�A�D
�	�	�	�	
������U�1�X�X���b�A�A�A�6�	8�	8�	8�	
�����	���4�4�m�D�D�D������	�%��(�(�(;�(;�<�<�/�	1�	1�	1������	�%��(�(�(;�(;�2�F�F�F�I�	�	�	�	
�����
�5��8�8�(<�(<�B�G�G�G�J�	�	�	�	
�����
�5��8�8�(<�(<�B�G�G�G�<�	>�	>�	>�	>�	>r
c�*�d}tj�d��}|�t	j|��|��d}tj�|��}|�t	j|��|��dS)NaE{frozenset(): frozenset({frozenset({2}), frozenset({0}), frozenset({1})}),
 frozenset({0}): frozenset({frozenset(),
                            frozenset({0, 2}),
                            frozenset({0, 1})}),
 frozenset({1}): frozenset({frozenset(),
                            frozenset({1, 2}),
                            frozenset({0, 1})}),
 frozenset({2}): frozenset({frozenset(),
                            frozenset({1, 2}),
                            frozenset({0, 2})}),
 frozenset({1, 2}): frozenset({frozenset({2}),
                               frozenset({1}),
                               frozenset({0, 1, 2})}),
 frozenset({0, 2}): frozenset({frozenset({2}),
                               frozenset({0}),
                               frozenset({0, 1, 2})}),
 frozenset({0, 1}): frozenset({frozenset({0}),
                               frozenset({1}),
                               frozenset({0, 1, 2})}),
 frozenset({0, 1, 2}): frozenset({frozenset({1, 2}),
                                  frozenset({0, 2}),
                                  frozenset({0, 1})})}r�aK5{frozenset({frozenset({0, 2}), frozenset({0})}): frozenset({frozenset({frozenset({0,
                                                                                  2}),
                                                                       frozenset({0,
                                                                                  1,
                                                                                  2})}),
                                                            frozenset({frozenset({0}),
                                                                       frozenset({0,
                                                                                  1})}),
                                                            frozenset({frozenset(),
                                                                       frozenset({0})}),
                                                            frozenset({frozenset({2}),
                                                                       frozenset({0,
                                                                                  2})})}),
 frozenset({frozenset({0, 1}), frozenset({1})}): frozenset({frozenset({frozenset({0,
                                                                                  1}),
                                                                       frozenset({0,
                                                                                  1,
                                                                                  2})}),
                                                            frozenset({frozenset({0}),
                                                                       frozenset({0,
                                                                                  1})}),
                                                            frozenset({frozenset({1}),
                                                                       frozenset({1,
                                                                                  2})}),
                                                            frozenset({frozenset(),
                                                                       frozenset({1})})}),
 frozenset({frozenset({1, 2}), frozenset({1})}): frozenset({frozenset({frozenset({1,
                                                                                  2}),
                                                                       frozenset({0,
                                                                                  1,
                                                                                  2})}),
                                                            frozenset({frozenset({2}),
                                                                       frozenset({1,
                                                                                  2})}),
                                                            frozenset({frozenset(),
                                                                       frozenset({1})}),
                                                            frozenset({frozenset({1}),
                                                                       frozenset({0,
                                                                                  1})})}),
 frozenset({frozenset({1, 2}), frozenset({2})}): frozenset({frozenset({frozenset({1,
                                                                                  2}),
                                                                       frozenset({0,
                                                                                  1,
                                                                                  2})}),
                                                            frozenset({frozenset({1}),
                                                                       frozenset({1,
                                                                                  2})}),
                                                            frozenset({frozenset({2}),
                                                                       frozenset({0,
                                                                                  2})}),
                                                            frozenset({frozenset(),
                                                                       frozenset({2})})}),
 frozenset({frozenset(), frozenset({0})}): frozenset({frozenset({frozenset({0}),
                                                                 frozenset({0,
                                                                            1})}),
                                                      frozenset({frozenset({0}),
                                                                 frozenset({0,
                                                                            2})}),
                                                      frozenset({frozenset(),
                                                                 frozenset({1})}),
                                                      frozenset({frozenset(),
                                                                 frozenset({2})})}),
 frozenset({frozenset(), frozenset({1})}): frozenset({frozenset({frozenset(),
                                                                 frozenset({0})}),
                                                      frozenset({frozenset({1}),
                                                                 frozenset({1,
                                                                            2})}),
                                                      frozenset({frozenset(),
                                                                 frozenset({2})}),
                                                      frozenset({frozenset({1}),
                                                                 frozenset({0,
                                                                            1})})}),
 frozenset({frozenset({2}), frozenset()}): frozenset({frozenset({frozenset({2}),
                                                                 frozenset({1,
                                                                            2})}),
                                                      frozenset({frozenset(),
                                                                 frozenset({0})}),
                                                      frozenset({frozenset(),
                                                                 frozenset({1})}),
                                                      frozenset({frozenset({2}),
                                                                 frozenset({0,
                                                                            2})})}),
 frozenset({frozenset({0, 1, 2}), frozenset({0, 1})}): frozenset({frozenset({frozenset({1,
                                                                                        2}),
                                                                             frozenset({0,
                                                                                        1,
                                                                                        2})}),
                                                                  frozenset({frozenset({0,
                                                                                        2}),
                                                                             frozenset({0,
                                                                                        1,
                                                                                        2})}),
                                                                  frozenset({frozenset({0}),
                                                                             frozenset({0,
                                                                                        1})}),
                                                                  frozenset({frozenset({1}),
                                                                             frozenset({0,
                                                                                        1})})}),
 frozenset({frozenset({0}), frozenset({0, 1})}): frozenset({frozenset({frozenset(),
                                                                       frozenset({0})}),
                                                            frozenset({frozenset({0,
                                                                                  1}),
                                                                       frozenset({0,
                                                                                  1,
                                                                                  2})}),
                                                            frozenset({frozenset({0}),
                                                                       frozenset({0,
                                                                                  2})}),
                                                            frozenset({frozenset({1}),
                                                                       frozenset({0,
                                                                                  1})})}),
 frozenset({frozenset({2}), frozenset({0, 2})}): frozenset({frozenset({frozenset({0,
                                                                                  2}),
                                                                       frozenset({0,
                                                                                  1,
                                                                                  2})}),
                                                            frozenset({frozenset({2}),
                                                                       frozenset({1,
                                                                                  2})}),
                                                            frozenset({frozenset({0}),
                                                                       frozenset({0,
                                                                                  2})}),
                                                            frozenset({frozenset(),
                                                                       frozenset({2})})}),
 frozenset({frozenset({0, 1, 2}), frozenset({0, 2})}): frozenset({frozenset({frozenset({1,
                                                                                        2}),
                                                                             frozenset({0,
                                                                                        1,
                                                                                        2})}),
                                                                  frozenset({frozenset({0,
                                                                                        1}),
                                                                             frozenset({0,
                                                                                        1,
                                                                                        2})}),
                                                                  frozenset({frozenset({0}),
                                                                             frozenset({0,
                                                                                        2})}),
                                                                  frozenset({frozenset({2}),
                                                                             frozenset({0,
                                                                                        2})})}),
 frozenset({frozenset({1, 2}), frozenset({0, 1, 2})}): frozenset({frozenset({frozenset({0,
                                                                                        2}),
                                                                             frozenset({0,
                                                                                        1,
                                                                                        2})}),
                                                                  frozenset({frozenset({0,
                                                                                        1}),
                                                                             frozenset({0,
                                                                                        1,
                                                                                        2})}),
                                                                  frozenset({frozenset({2}),
                                                                             frozenset({1,
                                                                                        2})}),
                                                                  frozenset({frozenset({1}),
                                                                             frozenset({1,
                                                                                        2})})})})�test�test_set�cuber�r�r��	linegraph)r�
cube_repr_tgtrY�
cubo_repr_tgt�cubos     r�test_set_of_sets_reprsz$QueryTestCase.test_set_of_sets_reprsns���4:�
�.�}�!�!�!�$�$��������-�-�}�=�=�=�\d�
�|�}�&�&�t�,�,��������-�-�}�=�=�=�=�=r
c��d}dddddddiiiiii}ddddddggggggg}|�tj|��t|����|�tj|��t|����|�tj|��t|����d}d	}d
}|�tj|d���|��|�tj|d���|��|�tj|d���|��dS)N)rI)r�)r�)r�)r�r�rIr�r�r�r�r�z
(1, (...))z
{1: {...}}z
[1, [...]]r�)r�r�r�rK)r�nested_tuple�nested_dict�nested_list�	lv1_tuple�lv1_dict�lv1_lists       r�
test_depthzQueryTestCase.test_depthBsE��1���1�q�1�q�1�a�&�k�"2�3�4�5���1�q�1�q�1�b�'�l�"3�4�5�6��������5�5�t�L�7I�7I�J�J�J�������4�4�d�;�6G�6G�H�H�H�������4�4�d�;�6G�6G�H�H�H� �	�����������A�>�>�>�	�J�J�J�������1�=�=�=�x�H�H�H�������1�=�=�=�x�H�H�H�H�Hr
c
�z�d}d�t|��D��}tj|��t|t���}d�}|�|t
jt|������dd�	tt|����zdz��|�|t
jt|������dd�	tt|����zd	z��|�|t
jt�|������dd�	d
�|D����zdz��|�t
jtdddi��d
tt��zdz��ddg}|�t
jt�|d����dt!t|t�����z��dS)NrCc�*�g|]}t����Sr	)rf��.0�is  r�
<listcomp>z>QueryTestCase.test_sort_unorderable_values.<locals>.<listcomp>Ts��0�0�0�!��
�
�0�0�0r
)�keyc�V�|�dd���dd��S)Nr�r�r�)r�)�ss r�<lambda>z<QueryTestCase.test_sort_unorderable_values.<locals>.<lambda>Ws$��!�)�)�C��,�,�4�4�T�"�=�=�r
�{�,�}zfrozenset({z})c3� K�|]	}d|zV��
dS)z%r:NoneNr	)rj�ks  r�	<genexpr>z=QueryTestCase.test_sort_unorderable_values.<locals>.<genexpr>^s&����8�8�Q�9�q�=�8�8�8�8�8�8r
rrIz{1: 0, z: 0})rIrz{%r: 0, %r: 0})r��random�shuffle�sortedrhr�r�r�r.r�r�rKr7r@rrfr%)r�n�keys�skeys�cleans     r�test_sort_unorderable_valuesz*QueryTestCase.test_sort_unorderable_valuesQs
����0�0�u�Q�x�x�0�0�0����t�����t��$�$�$��=�=�������v�~�c�$�i�i�8�8�9�9��#�(�(�3�t�U�+�+�,�,�,�s�2�	4�	4�	4������v�~�i��o�o�>�>�?�?��C�H�H�S��u�%5�%5�6�6�6��=�	?�	?�	?������v�~�d�m�m�D�.A�.A�B�B�C�C��#�(�(�8�8�%�8�8�8�8�8�8�3�>�	@�	@�	@�	
������a��A�(>�?�?�"�T�+�%6�%6�6��>�	@�	@�	@��g���������
�
�d�A�(>�(>�?�?�)�E�&��2�2F�2F�2F�,G�,G�G�	I�	I�	I�	I�	Ir
c���t��}tt|����}|�||��|�t	t|����t	t|������|�t||g��||g��|�t||g��||g��|�tj	t||g��d���d|�d|�d���|�tj	t||g��d���d|�d|�d���|�tj	t�||g��d���d|�d|�d���|�tj	t�||g��d���d|�d|�d���dS)NrIr�rqr�rsz	: None,
 z: None})
rfrjrn�
assertLessrMr�r�ryr�r�r.r@r)rrUr\s   r�*test_sort_orderable_and_unorderable_valuesz8QueryTestCase.test_sort_orderable_and_unorderable_valuesis����M�M���d�1�g�g��������1��������D��G�G���c�$�q�'�'�l�l�3�3�3������A����!�Q��0�0�0������A����!�Q��0�0�0�������Q��F���1�=�=�=�=�)*���A�A�A�.�	0�	0�	0�������Q��F���1�=�=�=�=�)*���A�A�A�.�	0�	0�	0�	
������
�
�q�!�f�(=�(=�Q�G�G�G�G�56�Q�Q����:�	<�	<�	<�������
�
�q�!�f�(=�(=�Q�G�G�G�G�56�Q�Q����:�	<�	<�	<�	<�	<r
c���d}|�tj|d���d��|�tjd|dd�d���d	��d
}|�tj|d���t|����|�tj|d���d
��|�tj|d���d��|�tj|gggggd���d��|�tj|gggggd���d��|�tj|gggggd���d��d}|�tj|d���t|����|�tjd��d��|dz}t	dd��D]|}tj||���}|�t|��|��tj|gdz|���}|�t|��|gdz���}dS)Nr�r��6('the quick brown '
 'fox jumped over '
 'a lazy dog')rIr�rr�zW{'a': 1,
 'b': 'the quick brown '
      'fox jumped over '
      'a lazy dog',
 'c': 2}u@Portons dix bons "whiskys"
à l'avocat goujat	 qui fumait au zoo�D�uN('Portons dix bons "whiskys"\n'
 "à l'avocat goujat\t qui "
 'fumait au zoo')rCuV('Portons dix bons '
 '"whiskys"\n'
 "à l'avocat "
 'goujat\t qui '
 'fumait au zoo')�#u^[[[[['Portons dix bons "whiskys"\n'
     "à l'avocat goujat\t qui "
     'fumait au zoo']]]]]un[[[[['Portons dix bons '
     '"whiskys"\n'
     "à l'avocat "
     'goujat\t qui '
     'fumait au zoo']]]]]�uv[[[[['Portons dix '
     'bons "whiskys"\n'
     "à l'avocat "
     'goujat\t qui '
     'fumait au '
     'zoo']]]]]�dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx�Pr��''r�r�r�)r�r�r�rKr�r�)rr*�special�unwrappabler�r!s      r�
test_str_wrapzQueryTestCase.test_str_wrap}s���:��������2�6�6�6�9�	�	�	�	
�����a�c��(B�(B�.0�2�2�2�4�	
�	
�	
�Y��������r�:�:�:�D��M�M�J�J�J�������r�:�:�:�=�	�	�	�	
������r�:�:�:�=�	�	�	�	
�����W�I�;�-��(9��D�D�D�G�	�	�	�	
�����W�I�;�-��(9��D�D�D�G�	�	�	�	
�����W�I�;�-��(9��D�D�D�G�	�	�	� ��������2�>�>�>��[�@Q�@Q�R�R�R�������+�+�T�2�2�2��2�
���1�b�\�\�	=�	=�E���w�e�<�<�<�I����T�)�_�_�g�6�6�6����y�1�}�E�B�B�B�I����T�)�_�_�w�i�!�m�<�<�<�<�		=�	=r
c���d�td��D��d�td��D��z}d}|�tj|dd���|��dS)	Nc�L�g|]!}tt||z������"Sr	�rr�ris  rrlz.QueryTestCase.test_compact.<locals>.<listcomp>�s*��
3�
3�
3�Q�d�5��Q��<�<� � �
3�
3�
3r
r�c�F�g|]}tt|������Sr	r�ris  rrlz.QueryTestCase.test_compact.<locals>.<listcomp>�s$��
/�
/�
/��d�5��8�8�n�n�
/�
/�
/r
r�z�[[], [0], [0, 1, 2, 3],
 [0, 1, 2, 3, 4, 5, 6, 7, 8],
 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
  14, 15],
 [], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3],
 [0, 1, 2, 3, 4]]�/T�r�r�)r�r�r�r�)rr�r�s   r�test_compactzQueryTestCase.test_compact�sm��
3�
3�%��(�(�
3�
3�
3�
/�
/�e�A�h�h�
/�
/�
/�0����	
�������T�B�B�B�H�M�M�M�M�Mr
c��d}d}dg|z}t|dz
��D]}|g}�t|dzdz|d|zzdz
��D]|}tj||d������}t	tt|����}|�||��|�||dz
���}dS)	NrCr�rrIr�r�Tr�)	r�r�r��
splitlines�maxr�r�assertLessEqual�
assertGreater)r�levels�numberr�rk�w�lines�maxwidths        r�test_compact_widthz QueryTestCase.test_compact_width�s�������
�C�&�L���v��z�"�"�	�	�A���A�A��v��z�A�~�v��F�
�':�Q�'>�?�?�	0�	0�A��N�1�A�t�<�<�<�G�G�I�I�E��3�s�E�?�?�+�+�H�� � ��1�-�-�-����x��Q��/�/�/�/�		0�	0r
c�P�|�tjdd���d��|�tjdd���d��d}|�tj|d���t|����|�tj|d	���d
��|�tj|d���d��|�tj|d
���d��t	td
����}|�tj|d���t|����|�tj|d���d��|�tj|d���d��|�tj|d���d��|�tjd|dd�d���d��|�tjd|dd�d���d��|�tj|ggggggd���d��|�tj|ggggggd���d��tdd��D]|}tj||���}|�t
|��|��tj|gdz|���}|�t
|��|gdz���}dS)Nr
rIr�zb''sabcdzb'abcd'�abcdefghijklmnopqrstuvwxyz�r�z$(b'abcdefghijkl'
 b'mnopqrstuvwxyz')�z)(b'abcdefghijkl'
 b'mnopqrstuvwx'
 b'yz')r��=�0zD(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b'
 b'\x0c\r\x0e\x0f')� zI(b'\x00\x01\x02\x03'
 b'\x04\x05\x06\x07\x08\t\n\x0b'
 b'\x0c\r\x0e\x0f')zN(b'\x00\x01\x02\x03'
 b'\x04\x05\x06\x07'
 b'\x08\t\n\x0b'
 b'\x0c\r\x0e\x0f')r�r�zJ{'a': 1,
 'b': b'abcdefghijkl'
      b'mnopqrstuvwx'
      b'yz',
 'c': 2}rCzJ{'a': 1,
 'b': b'abcdefgh'
      b'ijklmnop'
      b'qrstuvwxyz',
 'c': 2}r�z3[[[[[[b'abcdefghijklmnop'
      b'qrstuvwxyz']]]]]]r�zS[[[[[[b'\x00\x01\x02\x03\x04\x05\x06\x07'
      b'\x08\t\n\x0b\x0c\r\x0e\x0f']]]]]]�@)r�r�r�rK�bytesr�r�)r�lettersr�r�r!s     r�test_bytes_wrapzQueryTestCase.test_bytes_wrap�sj��������1�5�5�5�u�=�=�=�������q�9�9�9�9�E�E�E�/��������r�:�:�:�D��M�M�J�J�J�������r�:�:�:�=�	�	�	�	
������r�:�:�:�=�	�	�	�	
������r�:�:�:�=�	�	�	���b�	�	�"�"��������r�:�:�:�D��M�M�J�J�J�������r�:�:�:�=�	�	�	�	
������r�:�:�:�=�	�	�	�	
������q�9�9�9�<�	�	�	�
	
�����a�g�A�(F�(F�.0�2�2�2�4�	
�	
�	
�	
�����a�g�A�(F�(F�.0�2�2�2�4�	
�	
�	
�	
�����g�Y�K�=�/�):�(;�2�F�F�F�I�	�	�	�	
�����g�Y�K�=�/�):�(;�2�F�F�F�I5�	6�	6�	6��1�b�\�\�	=�	=�E���w�e�<�<�<�I����T�)�_�_�g�6�6�6����y�1�}�E�B�B�B�I����T�)�_�_�w�i�!�m�<�<�<�<�		=�	=r
c��|�tjt��d���d��td��}|�tj|d���t	|����|�tj|d���d��|�tj|d���d	��|�tj|d
���d	��ttd����}|�tj|d���t	|����|�tj|d
���d��|�tj|d���d��|�tj|d���d��|�tjd|dd�d���d��|�tj|gggggd���d��|�tj|gggggd���d��dS)NrIr�zbytearray(b'')r�r��z6bytearray(b'abcdefghijkl'
          b'mnopqrstuvwxyz')�zDbytearray(b'abcdefghijkl'
          b'mnopqrstuvwx'
          b'yz')r�r��H�9zVbytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b'
          b'\x0c\r\x0e\x0f')r�zdbytearray(b'\x00\x01\x02\x03'
          b'\x04\x05\x06\x07\x08\t\n\x0b'
          b'\x0c\r\x0e\x0f')zrbytearray(b'\x00\x01\x02\x03'
          b'\x04\x05\x06\x07'
          b'\x08\t\n\x0b'
          b'\x0c\r\x0e\x0f')r�rr�zi{'a': 1,
 'b': bytearray(b'abcdefghijkl'
                b'mnopqrstuvwx'
                b'yz'),
 'c': 2}�%zE[[[[[bytearray(b'abcdefghijklmnop'
               b'qrstuvwxyz')]]]]]�2ze[[[[[bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07'
               b'\x08\t\n\x0b\x0c\r\x0e\x0f')]]]]])r�r�r�r�rKr�)rr�r�s   r�test_bytearray_wrapz!QueryTestCase.test_bytearray_wrap
s��������	���1�=�=�=�?O�P�P�P��9�:�:��������r�:�:�:�D��M�M�J�J�J�������r�:�:�:�= �	!�	!�	!�	
������r�:�:�:�=�	�	�	�	
������r�:�:�:�=�	�	�	��E�"�I�I�&�&��������r�:�:�:�D��M�M�J�J�J�������r�:�:�:�=$�	%�	%�	%�	
������r�:�:�:�=$�	%�	%�	%�	
������q�9�9�9�<$�	%�	%�	%�
	
�����a�g�A�(F�(F�.0�2�2�2�4�	
�	
�	
�	
�����W�I�;�-��(9��D�D�D�G&�	'�	'�	'�	
�����W�I�;�-��(9��D�D�D�G>�	?�	?�	?�	?�	?r
c�v�tjt��}|�t	j|d���d��d���}tjtt|tj	������}|�t	j|��d��dS)NrIr�zdefaultdict(<class 'int'>, {})rz�defaultdict(<class 'int'>,
            {'a': 6,
             'brown': 2,
             'dog': 8,
             'fox': 3,
             'jumped': 4,
             'lazy': 7,
             'over': 5,
             'quick': 1,
             'the': 0}))
r�defaultdictrOr�r�r�rr�rrrs   r�test_default_dictzQueryTestCase.test_default_dict5s����#�C�(�(���������3�3�3�5U�V�V�V�<�B�B�D�D���#�C��U�I�O�4E�4E�)F�)F�G�G��������*�*�
�	�	�	�	�	r
c��tj��}|�tj|d���d��tjd��}|�tj|d���d��dS)NrIr�z	Counter()�
senselessnessr�zDCounter({'s': 6,
         'e': 4,
         'n': 2,
         'l': 1}))r�Counterr�r�r�rs  r�test_counterzQueryTestCase.test_counterGs}����!�!���������3�3�3�[�A�A�A����0�0���������4�4�4��	�	�	�	�	r
c�N�tj��}|�tj|d���d��d���}t
t|tj	������}tjt|����}|�tj|��d��tjt|��tj|����}|�tj|��d��dS)NrIr�zChainMap({})rz�ChainMap({'a': 6,
          'brown': 2,
          'dog': 8,
          'fox': 3,
          'jumped': 4,
          'lazy': 7,
          'over': 5,
          'quick': 1,
          'the': 0})a�ChainMap({'a': 6,
          'brown': 2,
          'dog': 8,
          'fox': 3,
          'jumped': 4,
          'lazy': 7,
          'over': 5,
          'quick': 1,
          'the': 0},
         OrderedDict([('the', 0),
                      ('quick', 1),
                      ('brown', 2),
                      ('fox', 3),
                      ('jumped', 4),
                      ('over', 5),
                      ('a', 6),
                      ('lazy', 7),
                      ('dog', 8)])))r�ChainMapr�r�r�rrr�rrr@r)rrdr�itemss    r�
test_chainmapzQueryTestCase.test_chainmapRs���� �"�"���������3�3�3�^�D�D�D�<�B�B�D�D���S��	�� 1� 1�2�2�3�3��� ��e���-�-��������*�*�	�
	�
	�
	�
� ��e���k�.E�e�.L�.L�M�M��������*�*�'�	(�	(�	(�	(�	(r
c��tj��}|�tj|d���d��tjd���}|�tj|d���d��d���}tjt
|tj������}|�tj|��d��tjt
|tj����d���}|�tj|��d	��dS)
NrIr�z	deque([])r�)�maxlenzdeque([], maxlen=7)rz�deque([('the', 0),
       ('quick', 1),
       ('brown', 2),
       ('fox', 3),
       ('jumped', 4),
       ('over', 5),
       ('a', 6),
       ('lazy', 7),
       ('dog', 8)])z�deque([('brown', 2),
       ('fox', 3),
       ('jumped', 4),
       ('over', 5),
       ('a', 6),
       ('lazy', 7),
       ('dog', 8)],
      maxlen=7))	r�dequer�r�r�rr�rrrs   r�
test_dequezQueryTestCase.test_dequeys&��������������3�3�3�[�A�A�A���Q�'�'�'���������3�3�3�5J�K�K�K�<�B�B�D�D����c�%���):�):�;�;�<�<��������*�*�	�
	�
	�
	�
��c�%���):�):�;�;�A�F�F�F��������*�*��		�		�		�		�		r
c�^�tj��}|�tj|d���d��d���}tjt
|tj������}|�tj|��d��dS)NrIr�z{}rzi{'a': 6,
 'brown': 2,
 'dog': 8,
 'fox': 3,
 'jumped': 4,
 'lazy': 7,
 'over': 5,
 'quick': 1,
 'the': 0})	r�UserDictr�r�r�rr�rrrs   r�test_user_dictzQueryTestCase.test_user_dict�s���� �"�"���������3�3�3�T�:�:�:�<�B�B�D�D��� ��U�I�O�,=�,=�!>�!>�?�?��������*�*�	�
	�
	�
	�
	�
	r
c�^�tj��}|�tj|d���d��d���}tjt
|tj������}|�tj|��d��dS)NrIr�z[]rz{[('the', 0),
 ('quick', 1),
 ('brown', 2),
 ('fox', 3),
 ('jumped', 4),
 ('over', 5),
 ('a', 6),
 ('lazy', 7),
 ('dog', 8)])	r�UserListr�r�r�rr�rrrs   r�test_user_listzQueryTestCase.test_user_list�s���� �"�"���������3�3�3�T�:�:�:�<�B�B�D�D��� ��U�I�O�,=�,=�!>�!>�?�?��������*�*�	�
	�
	�
	�
	�
	r
c�V�tjd��}|�tj|d���d��tjd��}|�tj|d���d��|�tjd|id���d��dS)	Nr�rIr�r�rrCr�zF{1: 'the quick '
    'brown fox '
    'jumped over a '
    'lazy dog'})r�
UserStringr�r�r�rs  r�test_user_stringzQueryTestCase.test_user_string�s����"�2�&�&���������3�3�3�T�:�:�:��"�#O�P�P���������4�4�4��	�	�	�
	
������A��b�9�9�9��	�	�	�	�	r
N)5rrrr�r�r�r�r�r�r�r�r�r�r�rrrrrr"r$r0r5r;r?rArDrGrIrMrSrU�unittest�expectedFailurerW�support�cpython_onlyr^rfr~r�r�r�r�r�r�r�r�r�r�r�r�r�r	r
rr�r�~s���������
E�E�E�D�D�D�"1�1�1�D�D�D�B
O�
O�
O�!>�!>�!>�F>�>�>�4"E�"E�"E�H
J�
J�
J�$�$�$�L
J�
J�
J�4�4�4�$V�V�V����&,�,�,�63�3�3�
;�;�;�
���0���25�5�5�
[�[�[�
	!�	!�	!�X�X�X�
T�T�T�
���	�	�	�;�;�;�&*>�*>�*>�X��	�\��O>�O>�����O>�b
I�
I�
I�I�I�I�0<�<�<�(:=�:=�:=�x
N�
N�
N�
0�
0�
0�7=�7=�7=�r)?�)?�)?�V���$	�	�	�%(�%(�%(�N���<���"���"����r
r�c��eZdZd�ZdS)rOc��t|t��rd|vrt|��ddfS|ddfStj�|||||��S)Nr�rIr)�
isinstancerMrKr�r��format)r�object�context�	maxlevels�levels     rr�zDottedPrettyPrinter.format�sb���f�c�"�"�	9��f�}�}��F�|�|�Q��)�)��q�!�|�#��'�.�.��f�g�y�%�9�9�
9r
N)rrrr�r	r
rrOrO�s#������9�9�9�9�9r
rO�__main__)/rr�rQr�rr�rw�test.supportrW�
test.test_setrr�rrrrr%r!r#r'r.r*r,r0r7r3r5r9r@r<r>rB�	dataclassrErTrYr[r`rarfrj�TestCaser�r�rOr�mainr	r
r�<module>r�s0��������������	�	�	�	�����
�
�
�
�
�
�
�
�����������������	�	�	�	�	�D�	�	�	�#�#�#�#�#�D�#�#�#�,�,�,�,�,�t�,�,�,�	�	�	�	�	�U�	�	�	�$�$�$�$�$�U�$�$�$�-�-�-�-�-��-�-�-�	�	�	�	�	�3�	�	�	�"�"�"�"�"�3�"�"�"�+�+�+�+�+�c�+�+�+�	�	�	�	�	��	�	�	�(�(�(�(�(��(�(�(�1�1�1�1�1�I�1�1�1�	�	�	�	�	�D�	�	�	�#�#�#�#�#�D�#�#�#�,�,�,�,�,�t�,�,�,�
��;�;�;�;�;�;�;���;�
��B�B�B�B�B�B�B���B�
���E�"�"�"��������#�"��
������������
������������
��������������������
��������$I�I�I�I�I�H�%�I�I�I�X"
9�
9�
9�
9�
9�&�.�
9�
9�
9��z����H�M�O�O�O�O�O��r