관리-도구
편집 파일: truncate.cpython-311.pyc
� �܋f � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ dZdZ dZ dd ee dedee d ee fd�Z ded efd�Z ddee dee dee d ee fd�Zdee ded ee fd�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 �B � t |� � rt | � � S | S )zGTruncate this assertion explanation if the given test item is eligible.)�_should_truncate_item�_truncate_explanation)r r r s �k/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/assertion/truncate.py�truncate_if_requiredr s( � � �T�"�"� 2�$�[�1�1�1��� c �X � | j j j }|dk ot j � � S )z9Whether or not this test item is eligible for truncation.� )�config�option�verboser � running_on_ci)r r s r r r s* � ��k� �(�G��Q�;�3�t�1�3�3�3�3r �input_lines� max_lines� max_charsc � � |�t }|�t }t d� | � � � � }|dz }|dz }t | � � |k r||k r| S | d|� }d}t d� |� � � � |k rt ||� � }nd}t | � � t |� � z }|d r|d dz |d<