+
    i_  c                   s    R t ^ RIHtHt ^ RIHt Rt^Pt^t^t	^t
^t]]	],           ],           ],           ]
,           ,
          t]^ 8  g   Q hR tR tRR ltR tR tR	 tR
 t]! RR4      tR tR tR# )zVarious utility functions.)
namedtupleCounter)commonprefixTc                 s    \        V 4      V,
          V,
          pV\        8  d"   R V RV W0\        V 4      V,
          R 3,          p V # )z%s[%d chars]%sN)len_PLACEHOLDER_LEN)s	prefixlenZ	suffixlenZskips   &&& &/usr/lib64/python3.14/unittest/util.py_shortenr      sI    q6I	)D*9ts1v	7I7J5KLLH    c                  s  aa \        \        \        V 4      4      p \        \        \        V 4      4      pV\
        8:  d   V # \        V 4      o\	        S4      o\
        VS,
          \        ,           \        ,           ,
          pV\        8  d{   \        \        ,           \        ,           VS,
          ,           \
        8  g   Q h\        S\        V4      o\         ;QJ d    . VV3R  lV  4       F  NK  	  5# ! VV3R  lV  4       4      # \        S\        \        4      o\         ;QJ d    . VV3R lV  4       F  NK  	  5# ! VV3R lV  4       4      # )c              3   s<   <"   T F  pSVSR  ,           x  K  	  R # 5iN Z.0r   prefixr      & r   	<genexpr>'_common_shorten_repr.<locals>.<genexpr>'   s     :TVa	
m++Ts   c              3   sb   <"   T F$  pS\        VSR  \        \        4      ,           x  K&  	  R # 5ir
   )r   _MIN_DIFF_LEN_MIN_END_LENr   r   r   r   r   *   s/       Q (1YZ=-NNNs   ,/)ZtupleZmap	safe_reprZmaxr   _MAX_LENGTHr   _MIN_BEGIN_LENr   _MIN_COMMON_LENr   )ZargsZmaxlenZ
common_lenr   r   s   *  @@r   _common_shorten_reprr      s   Y%&DS$ F$FFI9$~58HHJJO# 00?B"$&12 	2 2&.*=u:T:u:u:T:::fno>F5   5  5       r	   c                 s     \        V 4      pV'       d   \	        V4      \
        8  d   V# VR \
         R,           #   \         d    \        P                  T 4      p LPi ; i)Nz [truncated]...)ZreprZ	ExceptionobjectZ__repr__r   r   )ZobjZshortresults   && r   r   r   -   sW    &c CK+-,;"333	  &%&s   ;  AAc                 s<    V P                   : R V P                  : 2# )Z.)Z
__module__Z__qualname__)Zclss   &r   strclassr   6   s    nnc&6&677r	   c                sf   ^ ;r#. p. p  W,          pW,          pWg8  d5   VP                  V4       V^,          pW,          V8X  d   V^,          pK  KL  Wg8  d5   VP                  V4       V^,          pW,          V8X  d   V^,          pK  K  V^,          p W,          V8X  d   V^,          pK   V^,          pW,          V8X  d   V^,          pK  K    T^,          pY,          T8X  d   T^,          pK  i ; i  \         d,    TP                  YR 4       TP                  YR 4        YE3# i ; i)a^  Finds elements in only one or the other of two, sorted input lists.

Returns a two-element tuple of lists.    The first list contains those
elements in the "expected" list but not in the "actual" list, and the
second contains those elements in the "actual" list but not in the
"expected" list.    Duplicate elements in either input list are ignored.
N)appendZ
IndexErrorZextend)expectedactualijmissingZ
unexpectedZeZas   &&      r   sorted_list_differencer!   9   s:    IAGJ
	A	Auq!QkQ&FA '!!!$Qi1nFA % Q"+*Q + FA )q.Q ) FA )q.Q ) 	NN8B<(fRj)		s6   AC: 8C: 	C: C 1!C: #C77C: :1D0/D0c                s    . pV '       d%   V P                  4       p VP                  V4       K,  W!3#   \         d    TP                  T4        KN  i ; i)zSame behavior as sorted_list_difference but
for lists of unorderable items (like dicts).

As it does a linear search per item (remove) it
has O(n*n) performance.)ZpopZremoveZ
ValueErrorr   )r   r   r    Zitems   &&  r   unorderable_list_differencer"   b   sO     G
||~	!MM$
 ?	  	!NN4 	!s   2 AAc                s    W8  W8  ,
          # )z.Return -1 if x < y, 0 if x == y and 1 if x > yr   )ZxZys   &&r   three_way_cmpr#   s   s    Eaer	   ZMismatchzactual expected valuec                sv   \        V 4      \        V4      r2\        V4      \        V4      rT\        4       p. p\        V4       F  w  rWJ d   K  ^ ;r\	        W4       F  pW,,          V	8X  g   K  V
^,          p
WbV&   K!  	  \        V4       F  w  rW8X  g   K  V^,          pWcV&   K  	  W8w  g   Kn  \        WV	4      pVP                  V4       K  	  \        V4       FY  w  rWJ d   K  ^ p\	        W4       F  pW<,          V	8X  g   K  V^,          pWcV&   K!  	  \        ^ W4      pVP                  V4       K[  	  V# zHReturns list of (cnt_act, cnt_exp, elem) triples where the counts differ)Zlistr   r   Z	enumerateZrange	_Mismatchr   )r   r   r   tZmZnZNULLr   r   elemcnt_scnt_tr   Z
other_elemdiffs   &&             r   _count_diff_all_purposer+   y   s#    <hqq63q6q8DFQ<<qAtt|
!  'q\MA!
! * >U40DMM$    Q<<qAtt|
!  E(d   Mr	   c                sP   \        V 4      \        V4      r2. pVP                  4        F<  w  rVVP                  V^ 4      pWg8w  g   K  \        WgV4      pVP	                  V4       K>  	  VP                  4        F*  w  rWWR9  g   K  \        ^ Wu4      pVP	                  V4       K,  	  V# r$   )r   ZitemsZgetr%   r   )	r   r   r   r&   r   r'   r(   r)   r*   s	   &&       r   _count_diff_hashabler,      s     6?GH-qFwwydA>U40DMM$	 !
 wwy=Q,DMM$ ! Mr	   N)F)Z__doc__Zcollectionsr    r   Zos.pathr   Z
__unittestr   r   r   r   r   r   r   r   r   r   r!   r"   r#   r%   r+   r,   r   r	   r   <module>r-      s      +  
 !11OC !#/01   *48&R" z#:;	!Fr	   