Ë
    V.jk  ã                  óŠ   — d Z ddlmZ ddlmZ ddlmZ ddlmZ dZ	dZ
dZ	 d	 	 	 	 	 	 	 dd
„Zdd„Z	 	 d	 	 	 	 	 	 	 dd„Zdd„Zy	)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                ó2   — t        |«      rt        | «      S | S )zGTruncate this assertion explanation if the given test item is eligible.)Ú_should_truncate_itemÚ_truncate_explanation)ÚexplanationÚitemÚ
max_lengths      ú\C:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\_pytest/assertion/truncate.pyÚtruncate_if_requiredr      s   € ô ˜TÔ"Ü$ [Ó1Ð1ØÐó    c                óŒ   — | j                   j                  t        j                  «      }|dk  xr t	        j
                  «        S )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                óš  — |€t         }|€t        }t        dj                  | «      «      }|dz   }|dz   }t        | «      |k  r||k  r| S | d| }d}t        dj                  |«      «      |kD  rt	        ||«      }nd}t        | «      t        |«      z
  }|d   r|d   dz   |d<   |r|d	z  }nd|d<   g |¢d‘d
|› d|d	k(  rdnd› dt
        › �‘S )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
   "   s=  € ð ÐÜ%ˆ	ØÐÜ%ˆ	ô ˜2Ÿ7™7 ;Ó/Ó0Ðð 	�B‰ð ð $ a™-ÐäˆKÓÐ/Ò/ØÐ 3Ò3àÐà'¨
¨Ð3ÐØ€Nä
ˆ2�7‰7Ð(Ó)Ó*Ð-@Ò@Ü 7Ø! 9ó!
Ñð ˆä˜{Ó+¬cÐ2GÓ.HÑHÐØ˜RÒ à$9¸"Ñ$=ÀÑ$EÐ˜bÑ!Ùà  AÑ%Ñ ð %*Ð˜bÑ!ðØ	ðà
ðð %Ð%9Ð$:¸%Ø%¨Ò*‰2°Ð
4°J¼y¸kð	Kðð r   c                óÀ   — d}t        | «      D ]&  \  }}|t        |«      z   |kD  r n|t        |«      z  }Œ( | d  }| |   }|r
||z
  }|d | }|j                  |«       |S )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ÙØ$-Ð0CÑ$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   