
    dafX                        d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Zd dl
Z
d dlZ G d de      Z G d de      Z G d de      Z G d d	e      Z G d
 de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zej@                   G d  d!             Z!ej@                   G d" d#             Z" ej@                  d$%       G d& d'             Z#ej@                   G d( d)             Z$ej@                   G d* d+             Z%ej@                   G d, d-             Z& G d. d/      Z' G d0 d1      Z( G d2 d3ejR                        Z* G d4 d5ejV                        Z,e-d6k(  r ej\                          yy)7    Nc                       e Zd Zy)list2N__name__
__module____qualname__     +/root/Python-3.12.4/Lib/test/test_pprint.pyr   r          r
   r   c                       e Zd Zd Zy)list3c                 ,    t         j                  |       S N)list__repr__selfs    r   r   zlist3.__repr__       }}T""r
   Nr   r   r   r   r	   r
   r   r   r          #r
   r   c                       e Zd Zd Zy)list_custom_reprc                 D    dt        t        j                  |             z  S N*)lenr   r   r   s    r   r   zlist_custom_repr.__repr__       3t}}T*+++r
   Nr   r	   r
   r   r   r          ,r
   r   c                       e Zd Zy)tuple2Nr   r	   r
   r   r!   r!      r   r
   r!   c                       e Zd Zd Zy)tuple3c                 ,    t         j                  |       S r   )tupler   r   s    r   r   ztuple3.__repr__   s    ~~d##r
   Nr   r	   r
   r   r#   r#      s    $r
   r#   c                       e Zd Zd Zy)tuple_custom_reprc                 D    dt        t        j                  |             z  S r   )r   r%   r   r   s    r   r   ztuple_custom_repr.__repr__#   s    3u~~d+,,,r
   Nr   r	   r
   r   r'   r'   "   s    -r
   r'   c                       e Zd Zy)set2Nr   r	   r
   r   r*   r*   &   r   r
   r*   c                       e Zd Zd Zy)set3c                 ,    t         j                  |       S r   )setr   r   s    r   r   zset3.__repr__*   s    ||D!!r
   Nr   r	   r
   r   r,   r,   )   s    "r
   r,   c                       e Zd Zd Zy)set_custom_reprc                 D    dt        t        j                  |             z  S r   )r   r.   r   r   s    r   r   zset_custom_repr.__repr__.   s    3s||D)***r
   Nr   r	   r
   r   r0   r0   -   s    +r
   r0   c                       e Zd Zy)
frozenset2Nr   r	   r
   r   r3   r3   1   r   r
   r3   c                       e Zd Zd Zy)
frozenset3c                 ,    t         j                  |       S r   )	frozensetr   r   s    r   r   zfrozenset3.__repr__5   s    !!$''r
   Nr   r	   r
   r   r5   r5   4   s    (r
   r5   c                       e Zd Zd Zy)frozenset_custom_reprc                 D    dt        t        j                  |             z  S r   )r   r7   r   r   s    r   r   zfrozenset_custom_repr.__repr__9   s    3y))$/000r
   Nr   r	   r
   r   r9   r9   8   s    1r
   r9   c                       e Zd Zy)dict2Nr   r	   r
   r   r<   r<   <   r   r
   r<   c                       e Zd Zd Zy)dict3c                 ,    t         j                  |       S r   )dictr   r   s    r   r   zdict3.__repr__@   r   r
   Nr   r	   r
   r   r>   r>   ?   r   r
   r>   c                       e Zd Zd Zy)dict_custom_reprc                 D    dt        t        j                  |             z  S r   )r   r@   r   r   s    r   r   zdict_custom_repr.__repr__D   r   r
   Nr   r	   r
   r   rB   rB   C   r   r
   rB   c                   b    e Zd ZU eed<   eed<   dZeed<    ej                  dd      Z
eed<   y)	
dataclass1field1field2Ffield3   )defaultreprfield4N)r   r   r   str__annotations__intrH   booldataclassesfieldrL   r	   r
   r   rE   rE   G   s/    KKFD#+##AE:FC:r
   rE   c                   "    e Zd ZU dZeed<   d Zy)
dataclass2rI   ac                      y)N0custom repr that doesn't fit within pprint widthr	   r   s    r   r   zdataclass2.__repr__Q   s    Ar
   N)r   r   r   rU   rO   rN   r   r	   r
   r   rT   rT   N   s    AsJBr
   rT   F)rK   c                       e Zd ZU dZeed<   y)
dataclass3rI   rU   N)r   r   r   rU   rO   rN   r	   r
   r   rY   rY   T   s    AsJr
   rY   c                   &    e Zd ZU d ed<   dZeed<   y)
dataclass4rU   rI   bNr   r   r   rN   r\   rO   r	   r
   r   r[   r[   X       OAsJr
   r[   c                   &    e Zd ZU ded<   dZeed<   y)
dataclass5
dataclass6rU   rI   r\   Nr]   r	   r
   r   r`   r`   ]   r^   r
   r`   c                   &    e Zd ZU ded<   dZeed<   y)ra   r`   crI   dN)r   r   r   rN   rd   rO   r	   r
   r   ra   ra   b   r^   r
   ra   c                       e Zd Zd Zy)Unorderablec                 *    t        t        |             S r   )rM   idr   s    r   r   zUnorderable.__repr__h   s    2d8}r
   Nr   r	   r
   r   rf   rf   g   s    r
   rf   c                   <    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
y	)
	Orderablec                     || _         y r   _hash)r   hashs     r   __init__zOrderable.__init__m   s	    
r
   c                      y)NFr	   r   others     r   __lt__zOrderable.__lt__o   s    r
   c                     | |k7  S r   r	   rq   s     r   __gt__zOrderable.__gt__q       u}r
   c                     | |k(  S r   r	   rq   s     r   __le__zOrderable.__le__s   rv   r
   c                      y)NTr	   rq   s     r   __ge__zOrderable.__ge__u   s    r
   c                 
    | |u S r   r	   rq   s     r   __eq__zOrderable.__eq__w   s    u}r
   c                 
    | |uS r   r	   rq   s     r   __ne__zOrderable.__ne__y   s    5  r
   c                     | j                   S r   rl   r   s    r   __hash__zOrderable.__hash__{   s    zzr
   N)r   r   r   ro   rs   ru   rx   rz   r|   r~   r   r	   r
   r   rj   rj   l   s*    !r
   rj   c                   j   e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Ze jB                  e"jF                  jH                  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- Z4y.)/QueryTestCasec                     t        t        d            | _        t        t        d            | _        | j                  | j                  d<   y )Nd      i)r   rangerU   r\   r   s    r   setUpzQueryTestCase.setUp   s3    eCj!eCj!ffsr
   c                    t        j                         }t        j                  dddt        j                         d      }t        j                  dddt        j                               }t        j                  d      }| j	                  t
              5  t        j                  dddt        j                         d      }d d d        | j	                  t        t         j                  d	       | j	                  t        t         j                  d
       | j	                  t        t         j                  d       | j	                  t        t         j                  d
       y # 1 sw Y   xY w)N   (      T)indentwidthdepthstreamcompactF
sort_dictsr   r   r   r   )pprintPrettyPrinterioStringIOassertRaises	TypeError
ValueError)r   pps     r   	test_initzQueryTestCase.test_init   s   !!#!!"A)+F!!!RBKKM:!!U3y) 	E%%aQtDB	E*f&:&:2F*f&:&:!D*f&:&:"E*f&:&:!D	E 	Es   ,E##E,c                    t        j                         }dddddgdddidt        d      d	d
d d| j                  | j                  fD ]  }| j                  t        j                  |      d|       | j                  t        j                  |      d|       | j                  |j                  |      d|       | j                  |j                  |      d|        y )N   g       @y               @abc   )r   r   s   defs   ghiTF.expected not isrecursive for expected isreadable for )	r   r   	bytearrayrU   r\   assertFalseisrecursive
assertTrue
isreadable)r   r   safes      r   
test_basiczQueryTestCase.test_basic   s    !!#RUQFFv&eT3VVTVV% 	DD V//5BFHJOOF--d3<@BD R^^D1BFHJOOBMM$/<@BD	Dr
   c                     t        j                  d       5  d}t        j                  |       t        j                         j                  |       d d d        y # 1 sw Y   y xY w)Nzthis should not fail)
contextlibredirect_stdoutr   r   )r   values     r   test_stdout_is_Nonez!QueryTestCase.test_stdout_is_None   sM    ''- 	1*EMM%   "))%0		1 	1 	1s   ;AA#c                    | j                   | j                  d<   i | _        | j                  x| j                  d<   x| j                  d<   | j                  d<   t        j                         }| j                   | j                  | j                  | j                  | j                  ffD ]  }| j                  t        j                  |      d       | j                  t        j                  |      d       | j                  |j                  |      d       | j                  |j                  |      d        | j                  j                          | j                   d d = | j                  d d = | j                   | j                  | j                  | j                  | j                  ffD ]  }| j                  t        j                  |      d|       | j                  t        j                  |      d|       | j                  |j                  |      d|       | j                  |j                  |      d|        y )	NC   r   rI   r   zexpected isrecursivezexpected not isreadabler   r   )
rU   r\   rd   r   r   r   r   r   r   clear)r   r   ickyr   s       r   test_knottedzQueryTestCase.test_knotted   s    VVr
,0FF2q	2DFF1Iq	!!#FFDFFDFFTVVTVV,<< 	MDOOF..t46LMV..t46OPOOBNN402HIR]]402KL		M 	FF1IFF1IFFDFFDFFTVVTVV,<< 
	DDV//5BFHJOOF--d3<@BD R^^D1BFHJOOBMM$/<@BD
	Dr
   c                    t        j                         }t               t        t         t         j                  fD ]  }| j                  t        j                  |      d|       | j                  t        j                  |      d|       | j                  |j	                  |      d|       | j                  |j                  |      d|        y )Nr   zexpected not isreadable for )r   r   objectrO   r   r   r   )r   r   
unreadables      r   test_unreadablezQueryTestCase.test_unreadable   s    !!# (C1C1CC 
	OJV//
;BLNPV..z:AKMO R^^J7BLNPR]]:6AKMO
	Or
   c                    g d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t        d      ddgddidddgddit        d      t        d      t        t        d            ddgt        ddg      t	        ddg      t	        t        d            t        dh      t        dh      t        dh      t        dh      t        dh      t        dh      t        ddi      t        ddi      t        ddd      ddd dD ]  }t!        |      }| j#                  t        j$                  |      |       | j#                  t        j$                  |dd      j'                  dd      |       | j#                  t        j$                  |d      |       | j#                  t        j(                  |      |        y ) Nr   y                g         r
   r	   iy            g      x   xr   r      )rI   r   r   r   r         
   ir   TF.rI   r   r   
 underscore_numbers)r   r!   r#   r   r   r.   r*   r,   r7   r3   r5   r<   r>   r   r   r   rK   assertEqualpformatreplacesaferepr)r   simplenatives      r   test_same_as_reprzQueryTestCase.test_same_as_repr   sM   q ! T 3  C  !8%+X 7$)G u #f '+f !{	 %/L	 3=,	
 
 !7
 %*G  )/    % '+ -0 26 8A   S $%a&   !e '(V e} '-Um 6<E#J5G !u $QqEl -21Q%L ;@c
:K A3x "&qc -1!I !!~ (21# 9CA3 aV} ',QFm Rb)  !  #!  %)!  +.! 	>F$ &\FV^^F3V<V^^F!AF%gdC0&:V^^FtLfUV__V4f=/	>r
   c                    d}t               t        g d      t        t        |            t               t        g d      t        t        |            t               t        g d      t        t        |            t	               t	        g d      t	        t        |            t               t        ddi      t        t        t        |      t        |                  fD ]  }t        |      }dt        |      z  }| j                  t        j                  |      |       | j                  t        j                  |dd      |       | j                  t        j                  |      |        y )	N  )rI   r   r   r   r   r   rI   r   r   )r   r   r'   r0   r9   rB   ziprK   r   r   r   r   r   )r   Ncontr   expecteds        r   #test_container_repr_override_calledz1QueryTestCase.test_container_repr_override_called   s    &'%g.%eAh/&(&w/&uQx0$&$W-$U1X.*,*73*584%'%q!f-%c%(58&<= 	>D  $ZFS[(HV^^D18<V^^D!DhOV__T2H=)	>r
   c                     dddddddd}d}t         t        fD ]-  }| j                  t        j                   ||            |       / t        d      }ddj                  t        t        |            z  }t        t        fD ]-  }| j                  t        j                   ||            |       / t        t        d            }d	dj                  t        t        |            z  }t        t        fD ]-  }| j                  t        j                   ||            |       / t        d      }d
dj                  t        t        |            z  }t        t        fD ]/  }| j                  t        j                   ||      d      |       1 y )Nr   i  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maprM   r   r   r%   r!   )r   oexptypes       r   test_basic_line_wrapz"QueryTestCase.test_basic_line_wrap  s\   '(%&#$$)+" 5M 	;DV^^DG4c:	; #Jv{{3sA;//5M 	;DV^^DG4c:	; %*v{{3sA;//FO 	;DV^^DG4c:	; #J)..S!555M 	EDV^^DGA>D	Er
   c                     t        t        d            }t        ddd      }||g}d}| j                  t	        j
                  |dd	      |       d
}| j                  t	        j
                  |dd	      |       y )Nr   rI   r   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}])   )r   r   r@   r   r   r   )r   o1o2r   r   s        r   test_nested_indentationsz&QueryTestCase.test_nested_indentations;  sr    %)_!1-H. 	!2>I
 	!2>Ir
   c                 V   d}t        |      }| j                  t        j                  |d      |       | j                  t        j                  |d      |       | j                  t        j                  |d      |       | j                  t        j                  |d      d       y )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   )r   r   r   s      r   
test_widthzQueryTestCase.test_widthJ  s    	 N4h?4h?4h?4 7 	r
   c                    | j                  t        j                  d      d       | j                  t        j                  dd      d        G fddt              | j                  t        j                   d            d	       y )
Ni 1234567Tr   	1_234_567c                   (     e Zd Z fdZd Z xZS )/QueryTestCase.test_integer.<locals>.Temperaturec                 $    t         |   |      S r   )super__new__)clscelsius_degreesTemperature	__class__s     r   r   z7QueryTestCase.test_integer.<locals>.Temperature.__new__u  s    w{ODDr
   c                     | dz   }| dS )Ngfffffq@u   °Kr	   )r   kelvin_degreess     r   r   z8QueryTestCase.test_integer.<locals>.Temperature.__repr__w  s    !%()--r
   )r   r   r   r   r   __classcell__)r  r   s   @r   r   r   t  s    E.r
   r   r   u
   1273.15°K)r   r   r   rO   )r   r   s    @r   test_integerzQueryTestCase.test_integerp  sc    0)<DI;W	.# 	. 	D(9:LIr
   c                     dddd}| j                  t        j                  |      d       | j                  t        j                  ||g      d       | j                  t        j                  dg gi d      d       y )NrI   rU   r\   rc   z{'a': 1, 'b': 1, 'c': 1}z4[{'a': 1, 'b': 1, 'c': 1}, {'a': 1, 'b': 1, 'c': 1}]r   )zxy	ab
r   r	   z#{5: [[]], 'xy\tab\n': (3,), (): {}})r   r   r   r   rd   s     r   test_sorted_dictzQueryTestCase.test_sorted_dict|  sr    
 !!$*,FGA/B	D 	Trd(KL2	4r
   c                     t         j                  d      }| j                  t        j                  |d      d       | j                  t        j                  ||gd      d       y )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   r  s     r   test_sort_dictzQueryTestCase.test_sort_dict  sO    MM% e<>abA5AT	Vr
   c                    t        j                         }| j                  t        j                  |d      d       t        j                  g       }| j                  t        j                  |d      d       dj                         }t        j                  t        |t        j                                     }| j                  t        j                  |      d       y )NrI   r   zOrderedDict()*the quick brown fox jumped over a lazy dogzOrderedDict([('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r   rd   wordss      r   test_ordered_dictzQueryTestCase.test_ordered_dict  s    ##%3_E##B'3_E<BBD##Cy/@$AB*	
	r
   c                    dj                         }t        t        |t        j                                     }t        j                  |      }| j                  t        j                  |      d       t        j                  t        |t        j                                     }t        j                  |      }| j                  t        j                  |      d       y )Nr  zmappingproxy({'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  r@   r   r  r  typesMappingProxyTyper   r   r   r  r  )r   r  rd   ms       r   test_mapping_proxyz QueryTestCase.test_mapping_proxy  s    <BBDUIOO-./""1%* 	- 		 ##Cy/@$AB""1%* 	-+ 		,r
   c                 z    t        j                         }t        j                  |      }| j	                  |d       y )Nznamespace()r  SimpleNamespacer   r   r   r   ns	formatteds      r   test_empty_simple_namespacez)QueryTestCase.test_empty_simple_namespace  s.    ""$NN2&	M2r
   c                     t        j                  dd      }t        j                  |      }| j	                  |d       y )NrI   r   )rU   r\   znamespace(a=1, b=2)r  r   s      r   test_small_simple_namespacez)QueryTestCase.test_small_simple_namespace  s3    ""Q!,NN2&	$9:r
   c                     t        j                  ddddddddd	
	      }t        j                  |dd      }| j	                  |d       y )Nr   rI   r   r   r   r   r   r   r   	thequickbrownfoxjumpedoverrU   lazydog<   r   znamespace(the=0,
          quick=1,
          brown=2,
          fox=3,
          jumped=4,
          over=5,
          a=6,
          lazy=7,
          dog=8)r  r   s      r   test_simple_namespacez#QueryTestCase.test_simple_namespace  sV    ""

 NN2R:	 	% 		r
   c                      G d dt         j                        } |ddddddd	d
d	      }t        j                  |d      }| j	                  |d       y )Nc                       e Zd Zy)GQueryTestCase.test_simple_namespace_subclass.<locals>.AdvancedNamespaceNr   r	   r
   r   AdvancedNamespacer4    s    r
   r5  r   rI   r   r   r   r   r   r   r   r'  r0  r   zAdvancedNamespace(the=0,
                  quick=1,
                  brown=2,
                  fox=3,
                  jumped=4,
                  over=5,
                  a=6,
                  lazy=7,
                  dog=8)r  )r   r5  r!  r"  s       r   test_simple_namespace_subclassz,QueryTestCase.test_simple_namespace_subclass  s\    < 5 5<

 NN2R0	 	% 		r
   c                      t        j                  dd             }t        j                  |      }| j	                  |d       y )NMyDataclassr	   zMyDataclass())rQ   make_dataclassr   r   r   r   dcr"  s      r   test_empty_dataclassz"QueryTestCase.test_empty_dataclass  s7    :[''r:<NN2&	O4r
   c                 j    t        dd      }t        j                  |      }| j                  |d       y )Ntext{   z3dataclass1(field1='text', field2=123, field3=False))rE   r   r   r   r:  s      r   test_small_dataclassz"QueryTestCase.test_small_dataclass  s-    $NN2&	$YZr
   c                     t        dt        d      d      }t        j                  ||gdd      }| j	                  |d       y )Nzsome fairly long textg    _BTr0  r   r   z[   dataclass1(field1='some fairly long text',
               field2=10000000000,
               field3=True),
    dataclass1(field1='some fairly long text',
               field2=10000000000,
               field3=True)])rE   rO   r   r   r   r:  s      r   test_larger_dataclassz#QueryTestCase.test_larger_dataclass  s@    /TDANNB82a@	 %  	!r
   c                 j    t               }t        j                  |d      }| j                  |d       y )N   r   rW   )rT   r   r   r   r:  s      r   test_dataclass_with_reprz&QueryTestCase.test_dataclass_with_repr  s*    \NN2R0	$VWr
   c                 j    t               }t        j                  |d      }| j                  |d       y )Nr   r   z+<test.test_pprint.dataclass3 object at \w+>)rY   r   r   assertRegexr:  s      r   test_dataclass_no_reprz$QueryTestCase.test_dataclass_no_repr  s*    \NN2R0	$RSr
   c                 z    t        d       }||_        t        j                  |d      }| j	                  |d       y )Nr   r   z!dataclass4(a=...,
           b=1))r[   rU   r   r   r   r:  s      r   test_recursive_dataclassz&QueryTestCase.test_recursive_dataclass  s8    NN2R0	 % 	r
   c                     t        d       }t        d       }||_        ||_        t	        j
                  |d      }| j                  |d       y )Nr   r   zLdataclass5(a=dataclass6(c=...,
                        d=1),
           b=1))r`   ra   rU   rc   r   r   r   )r   dc5dc6r"  s       r   test_cyclic_dataclassz#QueryTestCase.test_cyclic_dataclass$  sI    NN3b1	 % 	r
   c                     ddd}d}t               }| j                  |j                  |      |       dg}d}| j                  |j                  |      |       dg}d}| j                  |j                  |      |       y )	Nz should be presented using repr()z	like.this)znames with spaceszothers.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   )r   r   r   dotted_printerr   exp1r   exp2s           r   test_subclassingzQueryTestCase.test_subclassing/  s    "D%02% -.//2C8 ^//3T: //3T:r
   c           	      @   | j                  t        j                  t                     d       | j                  t        j                  t        t	        d                  d       | j                  t        j                  t        t	        d            d      d       | j                  t        j                  t        t	        d            d      d       | j                  t        j                  t        t	        d            d      d	       | j                  t        j                  t                     d
       | j                  t        j                  t        t	        d                  d       | j                  t        j                  t        t	        d            d      d       | j                  t        j                  t        t	        d            d      d       | j                  t        j                  t        t	        d            d      d       y )Nzset()r   z	{0, 1, 2}r   rD  r   z{0,
 1,
 2,
 3,
 4,
 5,
 6}z?set2({0,
      1,
      2,
      3,
      4,
      5,
      6})zset3({0, 1, 2, 3, 4, 5, 6})zfrozenset()zfrozenset({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,   r7   r3   r5   r   s    r   test_set_reprszQueryTestCase.test_set_reprsB  s{   .8E!H6DE!HR@ C 	 	U1XbA D 	 	U1XbA6	8 		4mD	%((;</	1	%((;2F I 	 	
58(<BG J 	 	
58(<BG<	>r
   c                    d}t         j                  j                  d      }| j                  t	        j
                  |      |       d}t         j                  j                  |      }| j                  t	        j
                  |      |       y )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_tgtrZ  cubo_repr_tgtcubos        r   test_set_of_sets_reprsz$QueryTestCase.test_set_of_sets_reprsn  sq    4:. }}!!!$-}=\d| }}&&t,-}=r
   c                 J   d}dddddddiiiiii}ddddddg gggggg}| j                  t        j                  |      t        |             | j                  t        j                  |      t        |             | j                  t        j                  |      t        |             d}d	}d
}| j                  t        j                  |d      |       | j                  t        j                  |d      |       | j                  t        j                  |d      |       y )N)rI   )r   )r   )r   )r   r   rI   r   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_depthzQueryTestCase.test_depthB  s   11q1q1a&k"23451q1q1b'l"34565tL7IJ4d;6GH4d;6GH 	A>	J1=xH1=xHr
   c           
         d}t        |      D cg c]  }t                }}t        j                  |       t	        |t
              }d }| j                   |t        j                  t        |                  ddj                  t        t        |            z   dz          | j                   |t        j                  t        |                  ddj                  t        t        |            z   dz          | j                   |t        j                  t        j                  |                  ddj                  d	 |D              z   dz          | j                  t        j                  t        d
dd
i      dt        t              z   dz          ddg}| j                  t        j                  t        j                  |d
            dt!        t	        |t
                    z         y c c}w )NrD  )keyc                 F    | j                  dd      j                  dd      S )Nr   r   r   )r   )ss    r   <lambda>z<QueryTestCase.test_sort_unorderable_values.<locals>.<lambda>W  s    !))C,44T"= r
   {,}zfrozenset({z})c              3   &   K   | ]	  }d |z    yw)z%r:NoneNr	   ).0ks     r   	<genexpr>z=QueryTestCase.test_sort_unorderable_values.<locals>.<genexpr>^  s     8Q9q=8s   r   rI   z{1: 0, z: 0})rI   r   z{%r: 0, %r: 0})r   rf   randomshufflesortedrh   r   r   r   r.   r   r   rK   r7   r@   r  r%   )r   nikeysskeyscleans         r   test_sort_unorderable_valuesz*QueryTestCase.test_sort_unorderable_valuesQ  s   ',Qx0!00tt$=v~~c$i89#((3tU+,,s2	4v~~io>?CHHSu%566=	?v~~dmmD.ABC#((8%8883>	@ 	aA(>?"T+%66>	@ gdA(>?)E&22F,GG	I% 1s   G-c                 <   t               }t        t        |            }| j                  ||       | j                  t	        t        |            t	        t        |                   | j                  t        ||g      ||g       | j                  t        ||g      ||g       | j                  t        j                  t        ||g      d      d|d|d       | j                  t        j                  t        ||g      d      d|d|d       | j                  t        j                  t        j                  ||g      d      d|d|d       | j                  t        j                  t        j                  ||g      d      d|d|d       y )NrI   r   rm  r   ro  z	: None,
 z: None})rf   rj   rn   
assertLessrM   r   r   rv  r   r   r.   r@   r  )r   rU   r\   s      r   *test_sort_orderable_and_unorderable_valuesz8QueryTestCase.test_sort_orderable_and_unorderable_valuesi  s3   Md1g1DGc$q'l3A!Q0A!Q0QF1=)*A.	0QF1=)*A.	0 	q!f(=QG56:	<q!f(=QG56:	<r
   c                 f   d}| j                  t        j                  |d      d       | j                  t        j                  d|ddd      d	       d
}| j                  t        j                  |d      t        |             | j                  t        j                  |d      d       | j                  t        j                  |d      d       | j                  t        j                  |gggggd      d       | j                  t        j                  |gggggd      d       | j                  t        j                  |gggggd      d       d}| j                  t        j                  |d      t        |             | j                  t        j                  d      d       |dz  }t	        dd      D ]n  }t        j                  ||      }| j                  t        |      |       t        j                  |gdz  |      }| j                  t        |      |gdz         p y )Nr     r   6('the quick brown '
 'fox jumped over '
 'a lazy dog')rI   r   r  r   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 zooD      uN   ('Portons dix bons "whiskys"\n'
 "à l'avocat goujat\t qui "
 'fumait au zoo')rD  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']]]]]dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxP   r   ''r   r   r   )r   r   r   rK   r   r   )r   r+  specialunwrappabler   r"  s         r   test_str_wrapzQueryTestCase.test_str_wrap}  s   :26 9 	 	ac(B.024	 Yr:DMJr: = 	 	r: = 	 	WI;-(9D G 	 	WI;-(9D G 	 	WI;-(9D G 	  2>[@QR+T221b\ 	=Ewe<IT)_g6y1}EBIT)_wi!m<		=r
   c           	          t        d      D cg c]  }t        t        ||z               c}t        d      D cg c]  }t        t        |             c}z   }d}| j                  t        j                  |dd      |       y c c}w c c}w )Nr   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   r   )r   rx  r   r   s       r   test_compactzQueryTestCase.test_compact  sp    */(3Qd5Q< 3&+Ah/d58n/0 	TBHM 4/s
   BBc                 P   d}d}dg|z  }t        |dz
        D ]  }|g} t        |dz  dz   |d|z  z   dz
        D ]h  }t        j                  ||d      j                         }t	        t        t        |            }| j                  ||       | j                  ||dz
         j y )	NrD  r   r   rI   r   r   Tr  )	r   r   r   
splitlinesmaxr   r   assertLessEqualassertGreater)r   levelsnumberr   rx  wlinesmaxwidths           r   test_compact_widthz QueryTestCase.test_compact_width  s    C&Lvz" 	AA	vzA~vF
':Q'>? 	0ANN1At<GGIE3sE?+H  1-xQ/		0r
   c                    | j                  t        j                  dd      d       | j                  t        j                  dd      d       d}| j                  t        j                  |d      t        |             | j                  t        j                  |d	      d
       | j                  t        j                  |d      d       | j                  t        j                  |d      d       t	        t        d            }| j                  t        j                  |d      t        |             | j                  t        j                  |d      d       | j                  t        j                  |d      d       | j                  t        j                  |d      d       | j                  t        j                  d|ddd      d       | j                  t        j                  d|ddd      d       | j                  t        j                  |ggggggd      d       | j                  t        j                  |ggggggd      d       t        dd      D ]n  }t        j                  ||      }| j                  t        |      |       t        j                  |gdz  |      }| j                  t        |      |gdz         p y )Nr
   rI   r   zb''s   abcdzb'abcd'   abcdefghijklmnopqrstuvwxyz   r  z$(b'abcdefghijkl'
 b'mnopqrstuvwxyz')   z)(b'abcdefghijkl'
 b'mnopqrstuvwx'
 b'yz')r   =   0   zD(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}rD  zJ{'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_wrapzQueryTestCase.test_bytes_wrap  sx   15u=q99E/r:DMJr: = 	 	r: = 	 	r: = 	 b	"r:DMJr: = 	 	r: = 	 	q9 < 	
 	agA(F.024	 	agA(F.024	 	gYK=/):(;2F I 	 	gYK=/):(;2F I5 	6 1b\ 	=Ewe<IT)_g6y1}EBIT)_wi!m<		=r
   c                 :   | j                  t        j                  t               d      d       t        d      }| j                  t        j                  |d      t	        |             | j                  t        j                  |d      d       | j                  t        j                  |d      d	       | j                  t        j                  |d
      d	       t        t        d            }| j                  t        j                  |d      t	        |             | j                  t        j                  |d      d       | j                  t        j                  |d      d       | j                  t        j                  |d      d       | j                  t        j                  d|ddd      d       | j                  t        j                  |gggggd      d       | j                  t        j                  |gggggd      d       y )NrI   r   zbytearray(b'')r  r      z6bytearray(b'abcdefghijkl'
          b'mnopqrstuvwxyz')   zDbytearray(b'abcdefghijkl'
          b'mnopqrstuvwx'
          b'yz')r   r   H   9   zVbytearray(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   r  r  zi{'a': 1,
 'b': bytearray(b'abcdefghijkl'
                b'mnopqrstuvwx'
                b'yz'),
 'c': 2}%   zE[[[[[bytearray(b'abcdefghijklmnop'
               b'qrstuvwxyz')]]]]]2   ze[[[[[bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07'
               b'\x08\t\n\x0b\x0c\r\x0e\x0f')]]]]])r   r   r   r   rK   r   )r   r  r  s      r   test_bytearray_wrapz!QueryTestCase.test_bytearray_wrap
  s   	1=?OP9:r:DMJr: =  	! 	r: = 	 	r: = 	 E"I&r:DMJr: =$ 	% 	r: =$ 	% 	q9 <$ 	%
 	agA(F.024	 	WI;-(9D G& 	' 	WI;-(9D G> 	?r
   c                 Z   t        j                  t              }| j                  t	        j
                  |d      d       dj                         }t        j                  t        t        |t        j                                     }| j                  t	        j
                  |      d       y )NrI   r   zdefaultdict(<class 'int'>, {})r  zdefaultdict(<class 'int'>,
            {'a': 6,
             'brown': 2,
             'dog': 8,
             'fox': 3,
             'jumped': 4,
             'lazy': 7,
             'over': 5,
             'quick': 1,
             'the': 0}))
r  defaultdictrO   r   r   r   r  r   r  r  r  s      r   test_default_dictzQueryTestCase.test_default_dict5  sz    ##C(35UV<BBD##CUIOO4E)FG*
	r
   c                     t        j                         }| j                  t        j                  |d      d       t        j                  d      }| j                  t        j                  |d      d       y )NrI   r   z	Counter()senselessnessr   zDCounter({'s': 6,
         'e': 4,
         'n': 2,
         'l': 1}))r  Counterr   r   r   r  s     r   test_counterzQueryTestCase.test_counterG  s[    !3[A04	r
   c                    t        j                         }| j                  t        j                  |d      d       dj                         }t        t        |t        j                                     }t        j                  t        |            }| j                  t        j                  |      d       t        j                  t        |      t        j                  |            }| j                  t        j                  |      d       y )NrI   r   zChainMap({})r  zChainMap({'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   r  r   r   r  r  r@   r  )r   rd   r  itemss       r   test_chainmapzQueryTestCase.test_chainmapR  s      "3^D<BBDS	 123  e-*	
	   ek.E.Ee.LM*'	(r
   c                 p   t        j                         }| j                  t        j                  |d      d       t        j                  d      }| j                  t        j                  |d      d       dj                         }t        j                  t        |t        j                                     }| j                  t        j                  |      d       t        j                  t        |t        j                               d      }| j                  t        j                  |      d	       y )
NrI   r   z	deque([])r   )maxlenzdeque([], maxlen=7)r  zdeque([('the', 0),
       ('quick', 1),
       ('brown', 2),
       ('fox', 3),
       ('jumped', 4),
       ('over', 5),
       ('a', 6),
       ('lazy', 7),
       ('dog', 8)])zdeque([('brown', 2),
       ('fox', 3),
       ('jumped', 4),
       ('over', 5),
       ('a', 6),
       ('lazy', 7),
       ('dog', 8)],
      maxlen=7))	r  dequer   r   r   r  r   r  r  r  s      r   
test_dequezQueryTestCase.test_dequey  s    3[AQ'35JK<BBDc%):;<*	
	 c%):;AF*		r
   c                 F   t        j                         }| j                  t        j                  |d      d       dj                         }t        j                  t        |t        j                                     }| j                  t        j                  |      d       y )NrI   r   z{}r  zi{'a': 6,
 'brown': 2,
 'dog': 8,
 'fox': 3,
 'jumped': 4,
 'lazy': 7,
 'over': 5,
 'quick': 1,
 'the': 0})	r  UserDictr   r   r   r  r   r  r  r  s      r   test_user_dictzQueryTestCase.test_user_dict  su      "3T:<BBD  UIOO,=!>?*	
	r
   c                 F   t        j                         }| j                  t        j                  |d      d       dj                         }t        j                  t        |t        j                                     }| j                  t        j                  |      d       y )NrI   r   z[]r  z{[('the', 0),
 ('quick', 1),
 ('brown', 2),
 ('fox', 3),
 ('jumped', 4),
 ('over', 5),
 ('a', 6),
 ('lazy', 7),
 ('dog', 8)])	r  UserListr   r   r   r  r   r  r  r  s      r   test_user_listzQueryTestCase.test_user_list  su      "3T:<BBD  UIOO,=!>?*	
	r
   c                 F   t        j                  d      }| j                  t        j                  |d      d       t        j                  d      }| j                  t        j                  |d      d       | j                  t        j                  d|id      d       y )	Nr   rI   r   r  r  rD  r  zF{1: 'the quick '
    'brown fox '
    'jumped over a '
    'lazy dog'})r  
UserStringr   r   r   r  s     r   test_user_stringzQueryTestCase.test_user_string  s    ""2&3T:""#OP4	
 	Ab9	r
   N)5r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r  r#  r%  r1  r6  r<  r@  rB  rE  rH  rJ  rN  rT  rV  unittestexpectedFailurerX  supportcpython_onlyr_  rg  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r	   r
   r   r   r   ~   s$   
ED"1DBO!>F>4"EHJ$L
J4$V&,63
;
025
[
	!X
T
	;&*>X 	\\O>  O>bII0<(:=x
N
07=r)?V$	%(N<""r
   r   c                       e Zd Zd Zy)rP  c                     t        |t              rd|v rt        |      ddfS |ddfS t        j                  j                  | ||||      S )Nr   rI   r   )
isinstancerM   rK   r   r   format)r   r   context	maxlevelslevels        r   r  zDottedPrettyPrinter.format  sT    fc"f}F|Q))q!|#''..fgy%9 9r
   N)r   r   r   r  r	   r
   r   rP  rP    s    9r
   rP  __main__)/r  r   rQ   r   r  r   rt  test.supportrX  test.test_setr  r  r   r   r   r   r%   r!   r#   r'   r.   r*   r,   r0   r7   r3   r5   r9   r@   r<   r>   rB   	dataclassrE   rT   rY   r[   r`   ra   rf   rj   TestCaser   r   rP  r   mainr	   r
   r   <module>r     s      	       	D 	#D #,t ,	U 	$U $- -	3 	"3 "+c +	 	( (1I 1	D 	#D #,t , ; ; ; B B B
 E"  #          
 $IH%% IX"
9&.. 
9 zHMMO r
   