Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_pprint.cpython-39.opt-1.pyc

a

��g^��@s>ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	Gdd�de
�ZGdd�de
�ZGdd�de
�ZGdd	�d	e
�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�d�ZGdd�d�ZGdd�de	j�ZGdd�dej�Zedk�r:e	� �dS)�Nc@seZdZdS)�list2N��__name__�
__module__�__qualname__�rr�,/usr/local/lib/python3.9/test/test_pprint.pyrsrc@seZdZdd�ZdS)�list3cCs
t�|�S�N)�list�__repr__��selfrrrrszlist3.__repr__N�rrrrrrrrr	sr	c@seZdZdS)�tuple2Nrrrrrrsrc@seZdZdd�ZdS)�tuple3cCs
t�|�Sr
)�tuplerr
rrrrsztuple3.__repr__Nrrrrrrsrc@seZdZdS)�set2Nrrrrrrsrc@seZdZdd�ZdS)�set3cCs
t�|�Sr
)�setrr
rrrr sz
set3.__repr__Nrrrrrrsrc@seZdZdS)�
frozenset2Nrrrrrr#src@seZdZdd�ZdS)�
frozenset3cCs
t�|�Sr
)�	frozensetrr
rrrr'szfrozenset3.__repr__Nrrrrrr&src@seZdZdS)�dict2Nrrrrrr*src@seZdZdd�ZdS)�dict3cCs
t�|�Sr
)�dictrr
rrrr.szdict3.__repr__Nrrrrrr-src@seZdZdd�ZdS)�UnorderablecCstt|��Sr
)�str�idr
rrrr2szUnorderable.__repr__Nrrrrrr1src@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�	OrderablecCs
||_dSr
��_hash)r�hashrrr�__init__7szOrderable.__init__cCsdS)NFr�r�otherrrr�__lt__9szOrderable.__lt__cCs||kSr
rr$rrr�__gt__;szOrderable.__gt__cCs||kSr
rr$rrr�__le__=szOrderable.__le__cCsdS)NTrr$rrr�__ge__?szOrderable.__ge__cCs||uSr
rr$rrr�__eq__AszOrderable.__eq__cCs||uSr
rr$rrr�__ne__CszOrderable.__ne__cCs|jSr
r r
rrr�__hash__EszOrderable.__hash__N)rrrr#r&r'r(r)r*r+r,rrrrr6src@s2eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zejejjd'd(���Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Z d3d4�Z!d5d6�Z"d7d8�Z#d9d:�Z$d;d<�Z%d=d>�Z&d?d@�Z'dAdB�Z(dCdD�Z)dEdF�Z*dGS)H�
QueryTestCasecCs,ttd��|_ttd��|_|j|jd<dS)N�d��i�)r�range�a�br
rrr�setUpJszQueryTestCase.setUpcCs�t��}tjdddt��dd�}t�dddt���}tjdd�}|�t��&t�dddt��d�}Wd�n1sv0Y|jttjdd	�|jttjd
d�|jttjdd�|jttjd
d�dS)
N��(�T)�indent�width�depth�stream�compactF�Z
sort_dicts����r7r�r9�r8)�pprint�
PrettyPrinter�io�StringIOZassertRaises�	TypeError�
ValueError)r�pprrr�	test_initOs
�4zQueryTestCase.test_initcCs�t��}dddddgdddidtd�d	d
dd|j|jfD]d}|�t�|�d|f�|�t�|�d
|f�|�|�|�d|f�|�|�|�d
|f�q8dS)N�g@y@�abc�)rIrIsdefsghiTF.�expected not isrecursive for %r�expected isreadable for %r)	rArB�	bytearrayr1r2�assertFalse�isrecursive�
assertTrue�
isreadable)rrG�saferrr�
test_basic\s"�����zQueryTestCase.test_basiccCsH|j|jd<i|_|j|jd<|jd<|jd<t��}|j|j|j|j|jffD]L}|�t�|�d�|�t�|�d�|�|�|�d�|�|�|�d�qT|j�	�|jdd�=|jdd�=|j|j|j|j|jffD]d}|�t�|�d|f�|�t�|�d|f�|�|�|�d|f�|�|�|�d|f�q�dS)	N�Cr�rIzexpected isrecursivezexpected not isreadablerLrM)
r1r2�drArBrQrPrOrR�clear)rrGZickyrSrrr�test_knottedms2 
����zQueryTestCase.test_knottedcCs�t��}td�ttjfD]d}|�t�|�d|f�|�t�|�d|f�|�|�|�d|f�|�|�|�d|f�qdS)NrKrLzexpected not isreadable for %r)rArB�typerPrOrR)rrGZ
unreadablerrr�test_unreadable�s����zQueryTestCase.test_unreadablec9Csdddddddt�dt�t�gt�t�t�t�t�t�t	�t
�it�t�|j
tdddd	d
dtd�dd
gd
didd
dgdditd�td�ttd��d
dgtd
dg�td
dg�ttd��tdh�tdh�tdh�tdh�t	dh�t
dh�tddi�tddi�tddd�ddddf9D]R}t|�}|�t�|�|�|�tj|ddd��dd�|�|�t�|�|��qdS)Nryg��ri����y��g���x�x�rKrK�)rVrIr4r6r.���
i����r=TF.rV)r8r7�
� )rNrrrr	rrrrrrrrrQrAr0�repr�assertEqual�pformat�replaceZsaferepr)r�simpleZnativerrr�test_same_as_repr�s4	


$
���zQueryTestCase.test_same_as_reprcCsdddddddd�}d}ttfD]}|�t�||��|�q td�}dd�tt|��}t	t
fD]}|�t�||��|�q`ttd��}d	d�tt|��}ttfD]}|�t�||��|�q�td�}d
d�tt|��}t	t
fD]}|�tj||�dd
�|�q�dS)Nri��i��)ZRPM_calZRPM_cal2Z	Speed_calZcontroldesk_runtime_usZmain_code_runtime_usZread_io_runtime_usZwrite_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,
 z(%s)z[   %s]z,
    r4r>)
rrrhrArir0�join�maprrrrr)r�o�exprZrrr�test_basic_line_wrap�s.�z"QueryTestCase.test_basic_line_wrapcCs^ttd��}tdddd�}||g}d}|�tj|ddd	�|�d
}|�tj|ddd	�|�dS)NrdrVrIrK)�first�second�thirdzN[   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
    {'first': 1, 'second': 2, 'third': 3}]r4�*)r7r8za[   [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
    {   'first': 1,
        'second': 2,
        'third': 3}]�))rr0rrhrAri)rZo1Zo2ro�expectedrrr�test_nested_indentations�sz&QueryTestCase.test_nested_indentationscCshd}t|�}|�tj|dd�|�|�tj|dd�|�|�tj|dd�|�|�tj|dd�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']]]]])�evalrhrAri)rrwrorrr�
test_width�s
zQueryTestCase.test_widthcCsTdddd�}|�t�|�d�|�t�||g�d�|�t�dggid��d�dS)NrV�r1r2�cz{'a': 1, 'b': 1, 'c': 1}z4[{'a': 1, 'b': 1, 'c': 1}, {'a': 1, 'b': 1, 'c': 1}]r`)zxy	ab
r6rz#{5: [[]], 'xy\tab\n': (3,), (): {}})rhrAri�rrWrrr�test_sorted_dicts��zQueryTestCase.test_sorted_dictcCs>t�d�}|�tj|dd�d�|�tj||gdd�d�dS)NZcbaFr<z!{'c': None, 'b': None, 'a': None}zF[{'c': None, 'b': None, 'a': None}, {'c': None, 'b': None, 'a': None}])r�fromkeysrhrArir�rrr�test_sort_dict)s

�zQueryTestCase.test_sort_dictcCspt��}|�tj|dd�d�t�g�}|�tj|dd�d�d��}t�t|t����}|�t�|�d�dS)NrVr@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�OrderedDictrhrAri�split�zip�	itertools�count�rrW�wordsrrr�test_ordered_dict/s
�zQueryTestCase.test_ordered_dictcCsjd��}tt|t����}t�|�}|�t�	|�d�t
�t|t����}t�|�}|�t�	|�d�dS)Nr�z�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)])))r�rr�r�r��types�MappingProxyTyperhrArir�r�)rr�rW�mrrr�test_mapping_proxyBs


z QueryTestCase.test_mapping_proxycCs"t��}t�|�}|�|d�dS)Nznamespace()�r��SimpleNamespacerArirh�r�ns�	formattedrrr�test_empty_simple_namespace]s
z)QueryTestCase.test_empty_simple_namespacecCs(tjddd�}t�|�}|�|d�dS)NrVrI)r1r2znamespace(a=1, b=2)r�r�rrr�test_small_simple_namespacebs
z)QueryTestCase.test_small_simple_namespacecCs:tjddddddddd	d
�	}tj|dd�}|�|d
�dS)NrrVrIrKr4r6rarbrc�	ZtheZquickZbrown�foxZjumpedZoverr1ZlazyZdog�<r@z�namespace(the=0,
          quick=1,
          brown=2,
          fox=3,
          jumped=4,
          over=5,
          a=6,
          lazy=7,
          dog=8)r�r�rrr�test_simple_namespacegs�z#QueryTestCase.test_simple_namespacecCsJGdd�dtj�}|ddddddd	d
dd�	}tj|d
d�}|�|d�dS)Nc@seZdZdS)zGQueryTestCase.test_simple_namespace_subclass.<locals>.AdvancedNamespaceNrrrrr�AdvancedNamespace�r]r�rrVrIrKr4r6rarbrcr�r�r@z�AdvancedNamespace(the=0,
                  quick=1,
                  brown=2,
                  fox=3,
                  jumped=4,
                  over=5,
                  a=6,
                  lazy=7,
                  dog=8)r�)rr�r�r�rrr�test_simple_namespace_subclasss�z,QueryTestCase.test_simple_namespace_subclasscCs&ddd�}d}|�t��|�|�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})rh�DottedPrettyPrinterri)rrorprrr�test_subclassing�s
�zQueryTestCase.test_subclassingcCs|�t�t��d�|�t�ttd���d�|�tjttd��dd�d�|�tjttd��dd�d�|�tjttd��dd�d	�|�t�t��d
�|�t�ttd���d�|�tjttd��dd�d�|�tjttd��dd�d
�|�tjt	td��dd�d�dS)Nzset()rKz	{0, 1, 2}rb�r@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}))
rhrArirr0rrrrrr
rrr�test_set_reprs�s ���zQueryTestCase.test_set_reprscCsHd}tj�d�}|�t�|�|�d}tj�|�}|�t�|�|�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})})}rKaK5{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})})})})�testZtest_set�cuberhrAriZ	linegraph)rZ
cube_repr_tgtr�Z
cubo_repr_tgtZcuborrr�test_set_of_sets_reprs�sz$QueryTestCase.test_set_of_sets_reprscCs�d}dddddddiiiiii}ddddddggggggg}|�t�|�t|��|�t�|�t|��|�t�|�t|��d}d	}d
}|�tj|dd�|�|�tj|dd�|�|�tj|dd�|�dS)N)rV)rI)rK)r4)r6rarVrIrKr4r6raz
(1, (...))z
{1: {...}}z
[1, [...]]r?)rhrArirg)rZnested_tupleZnested_dictZnested_listZ	lv1_tupleZlv1_dictZlv1_listrrr�
test_depth�szQueryTestCase.test_depthc	Cs d}dd�t|�D�}t�|�t|td�}dd�}|�|t�t|���dd�	t
t|��d	�|�|t�t|���d
d�	t
t|��d�|�|t�t
�|���dd�	dd
�|D��d	�|�t�tdddi�dtt�d�ddg}|�t�t
�|d��dtt|td���dS)Nr�cSsg|]
}t��qSr)r��.0�irrr�
<listcomp>�r]z>QueryTestCase.test_sort_unorderable_values.<locals>.<listcomp>)�keycSs|�dd��dd�S)Nrfr\re)rj)�srrr�<lambda>�r]z<QueryTestCase.test_sort_unorderable_values.<locals>.<lambda>�{�,�}zfrozenset({z})css|]}d|VqdS)z%r:NoneNr)r��krrr�	<genexpr>�r]z=QueryTestCase.test_sort_unorderable_values.<locals>.<genexpr>rrVz{1: 0, z: 0})rVr
z{%r: 0, %r: 0})r0�random�shuffle�sortedrrhrArirrmrnrgrrr�rr)r�n�keysZskeysZcleanrrr�test_sort_unorderable_values�s*
�����z*QueryTestCase.test_sort_unorderable_valuescCs
t�}tt|��}|�||�|�tt|��tt|���|�t||g�||g�|�t||g�||g�|�tj	t
||g�dd�d||f�|�tj	t
||g�dd�d||f�|�tj	t�||g�dd�d||f�|�tj	t�||g�dd�d||f�dS)NrVr@z	{%r,
 %r}z{%r: None,
 %r: None})
rrr"Z
assertLessrrZrhr�rArirrr�)rr1r2rrr�*test_sort_orderable_and_unorderable_values�s$
�
�
�
�z8QueryTestCase.test_sort_orderable_and_unorderable_valuescCsxd}|�tj|dd�d�|�tjd|dd�dd�d	�d
}|�tj|dd�t|��|�tj|dd�d
�|�tj|dd�d�|�tj|gggggdd�d�|�tj|gggggdd�d�|�tj|gggggdd�d�d}|�tj|dd�t|��|�t�d�d�|d9}tdd�D]N}tj||d�}|�t|�|�tj|gd|d�}|�t|�|gd��q$dS)Nr��r@�6('the quick brown '
 'fox jumped over '
 'a lazy dog')rVrIrr{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')r�uV('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']]]]]Zdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx�Pr\�''rdrKr5)rhrArirgr0r})rr��specialZunwrappabler8r�rrr�
test_str_wrap�s.��   zQueryTestCase.test_str_wrapcCsDdd�td�D�dd�td�D�}d}|�tj|ddd	�|�dS)
NcSsg|]}tt||���qSr�rr0r�rrrr�r]z.QueryTestCase.test_compact.<locals>.<listcomp>r6cSsg|]}tt|���qSrr�r�rrrr�r]raz�[[], [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�r8r;)r0rhrAri)rrorwrrr�test_compacts
�zQueryTestCase.test_compactcCs�d}d}dg|}t|d�D]
}|g}qt|dd|d|d�D]B}tj||dd���}ttt|��}|�||�|�||d�qHdS)	Nr�rdrrVrIrKTr�)	r0rAri�
splitlines�maxrn�lenZassertLessEqualZ
assertGreater)rZlevels�numberror��w�linesZmaxwidthrrr�test_compact_width#s
"z QueryTestCase.test_compact_widthcCs�|�tjddd�d�|�tjddd�d�d}|�tj|dd�t|��|�tj|d	d�d
�|�tj|dd�d�|�tj|d
d�d�ttd
��}|�tj|dd�t|��|�tj|dd�d�|�tj|dd�d�|�tj|dd�d�|�tjd|dd�dd�d�|�tjd|dd�dd�d�|�tj|ggggggdd�d�|�tj|ggggggdd�d�tdd�D]N}tj||d�}|�t|�|�tj|gd|d�}|�t|�|gd��q~dS)Nr]rVr@zb''sabcdzb'abcd'�abcdefghijklmnopqrstuvwxyz�r�z$(b'abcdefghijkl'
 b'mnopqrstuvwxyz')�z)(b'abcdefghijkl'
 b'mnopqrstuvwx'
 b'yz')rz�=�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')rIr�zJ{'a': 1,
 'b': b'abcdefghijkl'
      b'mnopqrstuvwx'
      b'yz',
 'c': 2}r�zJ{'a': 1,
 'b': b'abcdefgh'
      b'ijklmnop'
      b'qrstuvwxyz',
 'c': 2}r{z3[[[[[[b'abcdefghijklmnop'
      b'qrstuvwxyz']]]]]]rvzS[[[[[[b'\x00\x01\x02\x03\x04\x05\x06\x07'
      b'\x08\t\n\x0b\x0c\r\x0e\x0f']]]]]]�@)rhrArirg�bytesr0r})r�lettersr�r8r�rrr�test_bytes_wrap/s:����""zQueryTestCase.test_bytes_wrapcCsF|�tjt�dd�d�td�}|�tj|dd�t|��|�tj|dd�d�|�tj|dd�d	�|�tj|d
d�d	�ttd��}|�tj|dd�t|��|�tj|d
d�d�|�tj|dd�d�|�tj|dd�d�|�tjd|dd�dd�d�|�tj|gggggdd�d�|�tj|gggggdd�d�dS)NrVr@zbytearray(b'')r�r5�z6bytearray(b'abcdefghijkl'
          b'mnopqrstuvwxyz')�zDbytearray(b'abcdefghijkl'
          b'mnopqrstuvwx'
          b'yz')r{rz�H�9zVbytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b'
          b'\x0c\r\x0e\x0f')rvzdbytearray(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')rIrr�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')]]]]])rhrArirNrgr0)rr�r�rrr�test_bytearray_wraphs$�� z!QueryTestCase.test_bytearray_wrapcCsTt�t�}|�tj|dd�d�d��}t�tt|t�	���}|�t�|�d�dS)NrVr@zdefaultdict(<class 'int'>, {})r�z�defaultdict(<class 'int'>,
            {'a': 6,
             'brown': 2,
             'dog': 8,
             'fox': 3,
             'jumped': 4,
             'lazy': 7,
             'over': 5,
             'quick': 1,
             'the': 0}))
r��defaultdict�intrhrArir�r�r�r�r�rrr�test_default_dict�s
�zQueryTestCase.test_default_dictcCsBt��}|�tj|dd�d�t�d�}|�tj|dd�d�dS)NrVr@z	Counter()Z
senselessnessr5zDCounter({'s': 6,
         'e': 4,
         'n': 2,
         'l': 1}))r��CounterrhrArir�rrr�test_counter�s
�zQueryTestCase.test_countercCs�t��}|�tj|dd�d�d��}tt|t�	���}t�t
|��}|�t�|�d�t�t
|�t�|��}|�t�|�d�dS)NrVr@zChainMap({})r�z�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��ChainMaprhrArir�rr�r�r�rr�)rrWr��itemsrrr�
test_chainmap�s��zQueryTestCase.test_chainmapcCs�t��}|�tj|dd�d�tjdd�}|�tj|dd�d�d��}t�t|t����}|�t�|�d�tjt|t���dd�}|�t�|�d	�dS)
NrVr@z	deque([])rb)�maxlenzdeque([], maxlen=7)r�z�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��dequerhrArir�r�r�r�r�rrr�
test_deque�s��zQueryTestCase.test_dequecCsPt��}|�tj|dd�d�d��}t�t|t����}|�t�|�d�dS)NrVr@z{}r�zi{'a': 6,
 'brown': 2,
 'dog': 8,
 'fox': 3,
 'jumped': 4,
 'lazy': 7,
 'over': 5,
 'quick': 1,
 'the': 0})	r��UserDictrhrArir�r�r�r�r�rrr�test_user_dict�s�zQueryTestCase.test_user_dictcCsPt��}|�tj|dd�d�d��}t�t|t����}|�t�|�d�dS)NrVr@z[]r�z{[('the', 0),
 ('quick', 1),
 ('brown', 2),
 ('fox', 3),
 ('jumped', 4),
 ('over', 5),
 ('a', 6),
 ('lazy', 7),
 ('dog', 8)])	r��UserListrhrArir�r�r�r�r�rrr�test_user_lists�zQueryTestCase.test_user_listcCs^t�d�}|�tj|dd�d�t�d�}|�tj|dd�d�|�tjd|idd�d�dS)	Nr\rVr@r�r�r�r�zF{1: 'the quick '
    'brown fox '
    'jumped over a '
    'lazy dog'})r��
UserStringrhrArir�rrr�test_user_strings

��zQueryTestCase.test_user_stringN)+rrrr3rHrTrYr[rlrqrxr~r�r�r�r�r�r�r�r�r�r��unittestZexpectedFailurer��supportZcpython_onlyr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr-HsL
!!$&,R<9+'r-c@seZdZdd�ZdS)r�cCsDt|t�r,d|vr t|�ddfS|ddfSntj�|||||�SdS)NrfrVr)�
isinstancerrgrArB�format)r�object�context�	maxlevels�levelrrrr�*s

�zDottedPrettyPrinter.formatN)rrrr�rrrrr�(sr��__main__)!r�rCr�rAr�Ztest.supportr�Z
test.test_setr�r�rrr	rrrrrrrrrrrrrrZTestCaser-rBr�r�mainrrrr�<module>s>g


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