e_SrSSKJrJr SSKJr SrSrSrSr Sr Sr \\ \-\ -\-\ -- r \ S:deSr S rSS jrS rS rS rSr\"SS5rSrSrg)zVarious utility functions.) namedtupleCounter) commonprefixTP cn[U5U- U- nU[:aSUSUX0[U5U- S4-nU$)Nz%s[%d chars]%s)len_PLACEHOLDER_LEN)s prefixlen suffixlenskips 3/opt/imh/python3.13/lib/python3.13/unittest/util.py_shortenrsI q6I  )D  *9 ts1v 7I7J5KL L Hc^^[[[U55n[[[U55nU[ ::aU$[ U5m[ T5m[ UT- [-[-- nU[:aK[[-[-UT- -[ :de[T[U5m[UU4SjU55$[T[[5m[UU4SjU55$)Nc34># UH nTUTS-v M g7fN.0r prefixr s r '_common_shorten_repr..'s:TVa m+Tsc3Z># UH nT[UTS[[5-v M" g7fr)r _MIN_DIFF_LEN _MIN_END_LENrs rrr*s, Q(1YZ=-NNs(+) tuplemap safe_reprmaxr _MAX_LENGTHr_MIN_BEGIN_LENr _MIN_COMMON_LENr)argsmaxlen common_lenrr s @@r_common_shorten_reprr)s Y% &D S$ F  $ FF I9$~58HHJJO# 00?B"$&12 22&.*=:T::: fno >F     rc[U5nU(a[ U5[ :aU$US[ S-$![a [RU5nNIf=f)Nz [truncated]...)repr Exceptionobject__repr__r r#)objshortresults rr!r!-sW&c CK+- ,; "3 33 &%&s 5AAc<UR<SUR<3$)N.) __module__ __qualname__)clss rstrclassr76snnc&6&6 77rcS=p#/n/nXnXnXg:a.URU5 US- nXU:XaUS- nXU:XaMOlXg:a.URU5 US- nXU:XaUS- nXU:XaMO9US- nXU:XaUS- nXU:XaMUS- nXU:XaUS- nXU:XaMM!US- nXU:XaUS- nXU:XaMff=f![a+ URXS5 URXS5 XE4$f=f)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. rN)append IndexErrorextend)expectedactualijmissing unexpectedeas rsorted_list_differencerE9sa IAGJ   A Auq!QkQ&FAkQ&!!!$Qi1nFAi1nQ"+*Q#+*FA )q.Q!)q.+ (FA )q.Q!)q.  NN8B< (   fRj )     s;8C0C8C>B3C3CCC0D  D c/nU(a+UR5nURU5 U(aM+X!4$![a URU5 N)f=f)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.)popremove ValueErrorr:)r=r>rAitems runorderable_list_differencerKbsV G ||~ ! MM$  ( ?  ! NN4  !s8AAcX:X:- $)z.Return -1 if x < y, 0 if x == y and 1 if x > yr)xys r three_way_cmprOss Eae rMismatchzactual expected valuecB[U5[U5p2[U5[U5pT[5n/n[U5H{upXLaM S=p[ X5Hn X,U :XdM U S- n XbU 'M [U5HupX:XdM U S- n XcU 'M X:wdM^[ XU 5nUR U5 M} [U5HOupXLaM Sn [ X5Hn X<U :XdM U S- n XcU 'M [ SX5nUR U5 MQ U$)HReturns list of (cnt_act, cnt_exp, elem) triples where the counts differrr9)listr r- enumeraterange _Mismatchr:)r>r=r tmnNULLr1r?elemcnt_scnt_tr@ other_elemdiffs r_count_diff_all_purposer`ys# <hq q63q6q 8D FQ< < qAtt| !'q\MA! !* >U40D MM$  Q< < qAtt| !E( d  MrcL[U5[U5p2/nUR5H;upVURUS5nXg:wdM[XgU5nUR U5 M= UR5H)upWXR;dM [SXu5nUR U5 M+ U$)rRr)ritemsgetrVr:) r>r=r rWr1r[r\r]r_s r_count_diff_hashablerds 6?GH-q Fwwy dA >U40D MM$  ! wwy  =Q,D MM$ ! MrN)F)__doc__ collectionsrros.pathr __unittestr#r r$rr%rrr)r!r7rErKrOrVr`rdrrrris +    !11OC !#/01   *48&R" z#: ; !Fr