| 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 : |
a
05d � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ dZdZ dZ
dee eee ee d
�dd�Z
eed
�dd�Zdee ee ee ee d�dd�Zee eee d�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�returnc C s t |�rt| �S | S )zGTruncate this assertion explanation if the given test item is eligible.)�_should_truncate_item�_truncate_explanation)r r r � r
�>/usr/lib/python3.9/site-packages/_pytest/assertion/truncate.py�truncate_if_required s r )r r
c C s | j jj}|dk ot�� S )z9Whether or not this test item is eligible for truncation.� )Zconfig�option�verboser Z
running_on_ci)r r r
r
r r s
r )�input_lines� max_lines� max_charsr
c C s� |du rt }|du rt}td�| ��}|d }|d }t| �|krN||krN| S | d|� }d}td�|��|kr|t||�}nd}t| �t|� }|d r�|d d |d<