ó
    ÚXái>  ã                  ó‚   • 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	 jrSS
 jr        SS 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)Úrunning_on_ci)ÚConfig)ÚItemé   éP   zuse '-vv' to showc                óF   • [        U5      u  p#nU(       a  [        U UUS9$ U $ )zGTruncate this assertion explanation if the given test item is eligible.)Ú	max_linesÚ	max_chars)Ú_get_truncation_parametersÚ_truncate_explanation)ÚexplanationÚitemÚshould_truncater
   r   s        ÚM/var/www/html/venv/lib/python3.13/site-packages/_pytest/assertion/truncate.pyÚtruncate_if_requiredr      s2   € ä,FÀtÓ,LÑ)€O 	ÞÜ$ØØØñ
ð 	
ð
 Ðó    c                ó‚  • U R                   R                  S5      n[        Ub  UO[        5      nU R                   R                  S5      n[        Ub  UO[        5      nU R                   R                  [        R                  5      nUS:  =(       a    [        5       (       + nU=(       a    US:„  =(       d    US:„  nXAU4$ )zgReturn the truncation parameters related to the given item, as (should truncate, max lines, max chars).Útruncation_limit_linesÚtruncation_limit_charsé   r   )	ÚconfigÚgetiniÚintÚDEFAULT_MAX_LINESÚDEFAULT_MAX_CHARSÚget_verbosityr   ÚVERBOSITY_ASSERTIONSr   )r   r
   r   Úverboser   s        r   r   r      s¡   € ð —‘×"Ñ"Ð#;Ó<€IÜ Ñ!6‘IÔ<MÓN€Ià—‘×"Ñ"Ð#;Ó<€IÜ Ñ!6‘IÔ<MÓN€Iàk‰k×'Ñ'¬×(CÑ(CÓD€Gà ‘k×9¬-«/Ô&9€OØ%×J¨9°q©=×+I¸IÈ¹M€Oà yÐ0Ð0r   c                ó¾  • [        SR                  U 5      5      nUS-   nUS-   n[        U 5      U::  a  X4::  a  U $ US:”  a  U SU nOU nSn[        SR                  U5      5      U:”  a  US:”  a  [        Xb5      nOSnX`:X  a  U$ [        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 max_lines, or max_chars - whichever the input reaches
first, taking the truncation explanation into account. The remaining lines
will be replaced by a usage message.
Ú éF   r   r   NTFéÿÿÿÿz...é   z...Full output truncated (z lineÚsz
 hidden), )ÚlenÚjoinÚ_truncate_by_char_countÚ	USAGE_MSG)	Úinput_linesr
   r   Úinput_char_countÚtolerable_max_charsÚtolerable_max_linesÚtruncated_explanationÚtruncated_charÚtruncated_line_counts	            r   r   r   4   sA  € ô ˜2Ÿ7™7 ;Ó/Ó0Ðð 	B‰ð ð $ a™-ÐäˆKÓÐ/Ó/ØÓ3àÐà1ƒ}Ø +¨J¨YÐ 7Ñà +ÐØ€Nä
ˆ27‰7Ð(Ó)Ó*Ð-@Ó@ÀYÐQRÃ]Ü 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(   z   s‚   € àÐÜ&/°Ö&<Ñ"ˆØ¤ Z£Ñ0°9Ó<ÙØœs :›Ñ.Òñ '=ð # ? NÐ3ÐØÑ,€JÞØ$-Ñ$CÐ!ØÐ :Ð!:Ð;ˆ
Ø×Ñ˜JÔ'ØÐr   N)r   ú	list[str]r   r   Úreturnr:   )r   r   r;   ztuple[bool, int, int])r*   r:   r
   r   r   r   r;   r:   )r*   r:   r   r   r;   r:   )Ú__doc__Ú
__future__r   Ú_pytest.compatr   Ú_pytest.configr   Ú_pytest.nodesr   r   r   r)   r   r   r   r(   © r   r   Ú<module>rB      sn   ðñõ #å (Ý !Ý ð Ð Ø%¨Ñ*Ð Ø€	ô	ô1ð*CØðCàðCð ðCð ô	CõLr   