ó
    ð?ìgk  ã                  ó–   • S r SSKJr  SSKJr  SSKJr  SSKJr  Sr	Sr
Sr S       SS
 jjrSS jr  S       SS jjrSS jrg	)zÑUtilities for truncating assertion output.

Current default behaviour is to truncate assertion explanations at
terminal lines, unless running with an assertions verbosity level of at least 2 or running on CI.
é    )Úannotations)Úutil)ÚConfig)ÚItemé   i€  zuse '-vv' to showNc                ó<   • [        U5      (       a  [        U 5      $ U $ )zGTruncate this assertion explanation if the given test item is eligible.)Ú_should_truncate_itemÚ_truncate_explanation)ÚexplanationÚitemÚ
max_lengths      Ú</usr/lib/python3/dist-packages/_pytest/assertion/truncate.pyÚtruncate_if_requiredr      s    € ô ˜T×"Ñ"Ü$ [Ó1Ð1ØÐó    c                ó    • U R                   R                  [        R                  5      nUS:  =(       a    [        R
                  " 5       (       + $ )z9Whether or not this test item is eligible for truncation.é   )ÚconfigÚget_verbosityr   ÚVERBOSITY_ASSERTIONSr   Úrunning_on_ci)r   Úverboses     r   r	   r	      s7   € àk‰k×'Ñ'¬×(CÑ(CÓD€GØQ‰;×3œt×1Ò1Ó3Ô3Ð3r   c                ó¶  • Uc  [         nUc  [        n[        SR                  U 5      5      nUS-   nUS-   n[        U 5      U::  a  X4::  a  U $ U SU nSn[        SR                  U5      5      U:”  a  [	        Xb5      nOSn[        U 5      [        U5      -
  nUS   (       a  US   S-   US'   U(       a  US	-  nOSUS'   / UQSPS
U SUS	:X  a  SOS S[
         3P$ )a  Truncate given list of strings that makes up the assertion explanation.

Truncates to either 8 lines, or 640 characters - whichever the input reaches
first, taking the truncation explanation into account. The remaining lines
will be replaced by a usage message.
NÚ éF   r   TFéÿÿÿÿz...é   z...Full output truncated (z lineÚsz
 hidden), )ÚDEFAULT_MAX_LINESÚDEFAULT_MAX_CHARSÚlenÚjoinÚ_truncate_by_char_countÚ	USAGE_MSG)	Úinput_linesÚ	max_linesÚ	max_charsÚinput_char_countÚtolerable_max_charsÚtolerable_max_linesÚtruncated_explanationÚtruncated_charÚtruncated_line_counts	            r   r
   r
   "   s9  € ð ÑÜ%ˆ	ØÑÜ%ˆ	ô ˜2Ÿ7™7 ;Ó/Ó0Ðð 	B‰ð ð $ a™-ÐäˆKÓÐ/Ó/ØÓ3àÐà'¨
¨Ð3ÐØ€Nä
ˆ27‰7Ð(Ó)Ó*Ð-@Ó@Ü 7Ø!ó!
Ñð ˆä˜{Ó+¬cÐ2GÓ.HÑHÐØ˜R× à$9¸"Ñ$=ÀÑ$EÐ˜bÑ!Þà  AÑ%Ð øð %*Ð˜bÑ!ðØ	ðà
ðð %Ð%9Ð$:¸%Ø%¨Ó*‰2°Ð
4°J¼y¸kð	Kðð r   c                óÊ   • Sn[        U 5       H'  u  p4U[        U5      -   U:”  a    OU[        U5      -  nM)     U S W nX   nU(       a	  X-
  nUS U nUR                  U5        U$ )Nr   )Ú	enumerater    Úappend)r$   r&   Úiterated_char_countÚiterated_indexÚ
input_lineÚtruncated_resultÚ
final_lineÚfinal_line_truncate_points           r   r"   r"   f   s‚   € àÐÜ&/°Ö&<Ñ"ˆØ¤ Z£Ñ0°9Ó<ÙØœs :›Ñ.Òñ '=ð # ? NÐ3ÐØÑ,€JÞØ$-Ñ$CÐ!ØÐ :Ð!:Ð;ˆ
Ø×Ñ˜JÔ'ØÐr   )N)r   ú	list[str]r   r   r   ú
int | NoneÚreturnr6   )r   r   r8   Úbool)NN)r$   r6   r%   r7   r&   r7   r8   r6   )r$   r6   r&   Úintr8   r6   )Ú__doc__Ú
__future__r   Ú_pytest.assertionr   Ú_pytest.configr   Ú_pytest.nodesr   r   r   r#   r   r	   r
   r"   © r   r   Ú<module>rA      s˜   ðñõ #å "Ý !Ý ð Ð ØÐ Ø€	ð BFðØðØ"&ðØ4>ðàõô4ð !Ø ðAØðAàðAð ðAð õ	AõHr   