+
    Spj$                        R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^t	]	^P,          t
RtR R ltR R	 ltR
 R ltR R ltR# )zUtilities 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)Itemzuse '-vv' to showc               $    V ^8  d   QhRRRRRR/# )   explanation	list[str]itemr   return )formats   "A/tmp/pip-target-d46v3snk/lib/python/_pytest/assertion/truncate.py__annotate__r      s!     	 	i 	t 		 	    c                N    \        V4      w  r#pV'       d   \        V VVR7      # V # )zGTruncate this assertion explanation if the given test item is eligible.)	max_lines	max_chars)_get_truncation_parameters_truncate_explanation)r   r
   should_truncater   r   s   &&   r   truncate_if_requiredr      s2    ,Ft,L)O	$
 	

 r   c                    V ^8  d   QhRRRR/# )r   r
   r   r   ztuple[bool, int, int]r   )r   s   "r   r   r      s     1 1T 1.C 1r   c                   V P                   P                  R4      p\        Ve   TM\        4      pV P                   P                  R4      p\        Ve   TM\        4      pV P                   P                  \        P                  4      pV^8  ;'       d    \        4       '       * pT;'       d    V^ 8  ;'       g    V^ 8  pWAV3# )zgReturn the truncation parameters related to the given item, as (should truncate, max lines, max chars).truncation_limit_linestruncation_limit_chars)	configgetiniintDEFAULT_MAX_LINESDEFAULT_MAX_CHARSget_verbosityr   VERBOSITY_ASSERTIONSr   )r
   r   r   verboser   s   &    r   r   r      s     ""#;<I!6I<MNI""#;<I!6I<MNIkk''(C(CDGk99-/&9O%JJ9q=+I+IIMOy00r   c               (    V ^8  d   QhRRRRRRRR/# )r   input_linesr	   r   r   r   r   r   )r   s   "r   r   r   4   s0     : ::: : 	:r   c                   V^F,           pV^ 8X  g   \        V 4      V^,           8:  d$   V^ 8X  g   \        R V  4       4      V8:  d   V # T pMV RV pV^ 8  ;'       d    \        R V 4       4      V8  pV'       d   \        WB4      pVR
;;,          R,          uu&   \        V 4      \        V4      ,
          \        V4      ,           p. VORNRT RV^8X  d   RMR R	\         2N# )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.

If max_chars=0, no truncation by character count is performed.
If max_lines=0, no truncation by line count is performed.

When this function is launched we know max_lines > 0 or max_chars > 0
because _get_truncation_parameters was called first.
c              3  8   "   T F  p\        V4      x  K  	  R # 5iNlen).0ss   & r   	<genexpr>(_truncate_explanation.<locals>.<genexpr>U   s      =AQ   Nc              3  8   "   T F  p\        V4      x  K  	  R # 5ir(   r)   )r+   es   & r   r-   r.   ^   s     6 51A 5r/   z... z...Full output truncated (z liner,   z
 hidden), )r*   sum_truncate_by_char_countr   	USAGE_MSG)r%   r   r   tolerable_max_charstruncated_explanationneed_to_truncate_chartruncated_line_counts   &&&    r   r   r   4   s   : 	B  A~[)Y]:>S = ==ATT + !,JY 7 	A 	M 	M6 5669LL   7!!
 "&K3455<Q8RR 	
 %%9$:%%*2
4Jyk	K r   c               $    V ^8  d   QhRRRRRR/# )r   r%   r	   r   r   r   r   )r   s   "r   r   r   q   s!       s y r   c                    ^ p\        V 4       F0  w  r4V\        V4      ,           V8  d    MV\        V4      ,          pK2  	  V RX pW,          pV'       d   W,
          pVRV pVP                  V4       V# )    N)	enumerater*   append)r%   r   iterated_char_countiterated_index
input_linetruncated_result
final_linefinal_line_truncate_points   &&      r   r5   r5   q   s    &/&<"Z09<s:. '= #?N3,J$-$C! :!:;
J'r   N)__doc__
__future__r   _pytest.compatr   _pytest.configr   _pytest.nodesr   r   r    r6   r   r   r   r5   r   r   r   <module>rK      sE    # ( !   %* 		1*:zr   