403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/_pytest/assertion/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/_pytest/assertion/__pycache__/truncate.cpython-39.pyc
a

05d�@s�dZddlmZddlmZddlmZddlmZdZdZ	dZ
deeeeeeed
�dd�Z
eed
�dd�Zdeeeeeeeed�dd�Zeeeeed�dd�Zd	S)z�Utilities for truncating assertion output.

Current default behaviour is to truncate assertion explanations at
~8 terminal lines, unless running in "-vv" mode or running on CI.
�)�List)�Optional)�util)�Item�i�zuse '-vv' to showN)�explanation�item�
max_length�returncCst|�rt|�S|S)zGTruncate this assertion explanation if the given test item is eligible.)�_should_truncate_item�_truncate_explanation)rrr	�r
�>/usr/lib/python3.9/site-packages/_pytest/assertion/truncate.py�truncate_if_requiredsr)rr
cCs|jjj}|dkot��S)z9Whether or not this test item is eligible for truncation.�)Zconfig�option�verboserZ
running_on_ci)rrr
r
rrs
r)�input_lines�	max_lines�	max_charsr
c	Cs�|durt}|durt}td�|��}|d}|d}t|�|krN||krN|S|d|�}d}td�|��|kr|t||�}nd}t|�t|�}|dr�|dd|d<|r�|d	7}nd|d<|dd
|�d|d	kr�dnd�d
t��gS)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)	rrrZinput_char_countZtolerable_max_charsZtolerable_max_linesZtruncated_explanationZtruncated_charZtruncated_line_countr
r
rr!sD
�
���
���r)rrr
cCspd}t|�D](\}}|t|�|kr(q6|t|�7}q|d|�}||}|rb||}|d|�}|�|�|S)Nr)�	enumerater�append)rrZiterated_char_countZiterated_indexZ
input_lineZtruncated_resultZ
final_lineZfinal_line_truncate_pointr
r
rrds
r)N)NN)�__doc__�typingrrZ_pytest.assertionrZ
_pytest.nodesrrrr �str�intr�boolrrrr
r
r
r�<module>s,��	��C

Youez - 2016 - github.com/yon3zu
LinuXploit