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__/util.cpython-312.pyc
�

��Hg)O���UdZddlmZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddlmZdd	lm
Z
dd
lmZddlmZddlmZdd
lmZddlZddlmZddlmZddlmZddlmZdZded<dZded<dZded<Gd�de�Z d5d�Z!d6d�Z"d7d�Z#d8d�Z$d8d�Z%d8d�Z&d8d �Z'd9d!�Z(d9d"�Z)d9d#�Z*d9d$�Z+				d:d%�Z,	d;									d<d&�Z-	d=									d>d'�Z.d=d?d(�Z/	d=									d@d)�Z0	d=									dAd*�Z1	d=									dBd+�Z2	d=									dBd,�Z3	d=									dBd-�Z4	d=									dBd.�Z5	d=									dBd/�Z6										dCd0�Z7	d=									dDd1�Z8										d>d2�Z9d=dEd3�Z:dFd4�Z;y)Gz"Utilities for assertion debugging.�)�annotationsN)�AbstractSet)�Any)�Callable)�Iterable)�Literal)�Mapping)�Protocol)�Sequence)�	normalize)�outcomes)�
PrettyPrinter)�saferepr)�saferepr_unlimited)�Configz2Callable[[str, object, object], str | None] | None�_reprcomparez&Callable[[int, str, str], None] | None�_assertion_passz
Config | None�_configc��eZdZddd�Zy)�_HighlightFuncc��y)z'Apply highlighting to the given source.N�)�self�source�lexers   �8C:\Python312\Lib\site-packages\_pytest/assertion/util.py�__call__z_HighlightFunc.__call__*s��N)�python)r�strrzLiteral['diff', 'python']�returnr )�__name__�
__module__�__qualname__rrrrrr)s��6rrc�P�t|�}t|�}dj|�S)a�Format an explanation.

    Normally all embedded newlines are escaped, however there are
    three exceptions: \n{, \n} and \n~.  The first two are intended
    cover nested explanations, see function and attribute explanations
    for examples (.visit_Call(), visit_Attribute()).  The last one is
    for when one explanation needs to span multiple lines, e.g. when
    displaying diffs.
    �
)�_split_explanation�
_format_lines�join)�explanation�lines�results   r�format_explanationr-.s'��
�{�+�E�
�5�
!�F��9�9�V��rc��|xsdjd�}|dg}|ddD]-}|r|ddvr|j|��|dxxd|zz
cc<�/|S)	z�Return a list of individual lines in the explanation.

    This will return a list of lines split on '\n{', '\n}' and '\n~'.
    Any other newlines will be escaped and appear in the line as the
    literal '\n' characters.
    �r&r�N)�{�}�~�>���z\n)�split�append)r*�	raw_linesr+�valuess    rr'r'=sm���"��)�)�$�/�I�
�q�\�N�E��A�B�-�(���f�Q�i�#7�7��L�L�� ��"�I����'�I�	(�
�Lrc��t|dd�}dg}dg}|ddD�]"}|jd�ro|drd}nd}|jt|��|dxxdz
cc<|jd�|jdd	t|�dz
zz|z|ddz���|jd
�r4|j	�|j	�||dxx|ddz
cc<��|ddvsJ�|dxxdz
cc<|jd�rt|�n
t|�dz
}|jd	|z|ddz���%t|�dk(sJ�|S)
aFormat the individual lines.

    This will replace the '{', '}' and '~' characters of our mini formatting
    language with the proper 'where ...', 'and ...' and ' + ...' text, taking
    care of indentation along the way.

    Return a list of formatted lines.
    Nr0rr1r5zand   zwhere z +�  r2)r3r4r3)�list�
startswithr7�len�pop)r+r,�stack�stackcnt�line�s�indents       rr(r(NsR���%���)�_�F�
�C�E��s�H��a�b�	�4���?�?�3����|������L�L��V��%��R�L�A��L��O�O�A���M�M�$���U��a��!8�8�1�<�t�A�B�x�G�H�
�_�_�S�
!��I�I�K��L�L�N��5��9���a�b��)����7�j�(�(�(��"�I��N�I�#'�?�?�3�#7�S��Z�S��Z�!�^�F��M�M�$��-�$�q�r�(�2�3�%4�&�u�:��?��?��Mrc�p�t|tjj�xrt|t�S�N)�
isinstance�collections�abcrr ��xs r�
issequencerLqs(���a����1�1�2�M�:�a��;M�7M�Mrc�"�t|t�SrF)rGr rJs r�istextrNus���a���rc�"�t|t�SrF)rG�dictrJs r�isdictrQys���a���rc�.�t|ttf�SrF)rG�set�	frozensetrJs r�issetrU}s���a�#�y�)�*�*rc�D�t|t�xrt|dd�duS)N�_fields)rG�tuple�getattr��objs r�isnamedtupler\�s"���c�5�!�O�g�c�9�d�&C�4�&O�Orc� �t|dd�duS)N�__dataclass_fields__�rYrZs r�	isdataclsr`�s���3�.��5�T�A�Arc� �t|dd�duS)N�__attrs_attrs__r_rZs r�isattrsrc�s���3�)�4�0��<�<rc�P�	t|�t|�S#t$rYywxYw)NF)�iterrN�	ExceptionrZs r�
isiterablerg�s,����S�	��#�;��������s��	%�%c���t|jd�rTt|jjd�r4|jjj}t	|�rd|vS|dk(Sy)a�Check if an instance of an object contains the default eq

    First, we check if the object's __eq__ attribute has __code__,
    if so, we check the equally of the method code filename (__code__.co_filename)
    to the default one generated by the dataclass and attr module
    for dataclasses the default co_filename is <string>, for attrs class, the __eq__ should contain "attrs eq generated"
    �__code__�co_filenamezattrs generated eqz<string>T)�hasattr�__eq__rirjrc)r[�
code_filenames  r�has_default_eqrn�sZ���s�z�z�:�&�7�3�:�:�3F�3F�
�+V��
�
�+�+�7�7�
��3�<�'�=�8�8��
�*�*�rc��|jtj�}t|t�xr+t|t�xrtd|�td|�k(}|dkDrt
||��}t
||��}n0dt|�z
dz
dz}t|||��}t|||��}|�d|�d|��}	|j�j}
d}	|d	k(rt|||
|�}n�|d
k(r$t|�r�t|�r�t|||�}n�|dk(rt|�r�t|�r�dg}n�|d
k(r%t|�r�t|�r�t|||
|�}n}|dk(r%t|�rmt|�rbt!|||
|�}nS|dk(r%t|�rCt|�r8t#|||
|�}n)|dk(r$t|�rt|�rt%|||
|�}|sy|ddk7rdg|�}|	g|�S#t&j($r�t*$rAt,j.j0j3�j5�}d|�d�dg}Y�qwxYw)z<Return specialised explanations for some operators/operands.�NFDr0)�	use_ascii�A�)�maxsizerq� Nz==znot inz!=�Both sets are equalz>=z<=r4�<z<(pytest_assertion plugin: representation of details failed: �.z+ Probably an object has a faulty __repr__.)rr/)�
get_verbosityr�VERBOSITY_ASSERTIONSrGr rrr>r�get_terminal_writer�
_highlight�_compare_eq_anyrN�_notin_textrU�_compare_gte_set�_compare_lte_set�_compare_gt_set�_compare_lt_setr
�Exitrf�_pytest�_code�
ExceptionInfo�from_current�
_getreprcrash)
�config�op�left�rightrq�verbose�	left_repr�
right_reprrt�summary�highlighterr*�
repr_crashs
             r�assertrepr_comparer��sQ���"�"�6�#>�#>�?�G�
	�4���	>��u�c�"�	>��e�T�"�i��u�&=�=����{�&�t�y�A�	�'���C�
�

�c�"�g���!�
����T�7�i�H�	��e�W�	�J�
���1�R�D��*��.�G��,�,�.�9�9�K��K�
�
��:�)�$��{�G�L�K�
�8�^��d�|��u�
�)�$��w�?��
�4�Z��T�{�u�U�|�4�5��
�4�Z��T�{�u�U�|�.�t�U�K��Q��
�4�Z��T�{�u�U�|�.�t�U�K��Q��
�3�Y��T�{�u�U�|�-�d�E�;��P��
�3�Y��T�{�u�U�|�-�d�E�;��P�����1�~����(�K�(���"�k�"�"���=�=��
��
��]�]�0�0�=�=�?�M�M�O�
�J�:�,�VW�X�9�
��
�s�DG,�,AI	�I	c���g}t|�rt|�rt|||�}|Sddlm}t	||�st	||�r2t	||�r|n|}t	||�r|n|}|j|�}n�t
|�t
|�ur0t|�st|�st|�rt||||�}nnt|�rt|�rt||||�}nIt|�rt|�rt||||�}n$t|�rt|�rt!||||�}t#|�r*t#|�rt%||||�}|j'|�|S)Nr)�
ApproxBase)rN�
_diff_text�_pytest.python_apir�rG�
_repr_compare�typer`rcr\�_compare_eq_clsrL�_compare_eq_sequencerU�_compare_eq_setrQ�_compare_eq_dictrg�_compare_eq_iterable�extend)	r�r�r�r�r*r��approx_side�
other_side�expls	         rr}r}�s6���K�
�d�|��u�
� ��u�g�6��:��7	2��d�J�'�:�e�Z�+H�",�T�:�">�$�E�K�",�T�:�">��D�J�%�3�3�J�?�K�
�$�Z�4��;�
&��d�O�w�t�}��T�0B�*�$��{�G�L�K�
��
�*�U�"3�.�t�U�K��Q�K�
�4�[�U�5�\�)�$��{�G�L�K�
�D�\�f�U�m�*�4���W�M�K��d��
�5� 1�'��e�[�'�J�D����t�$��rc���ddlm}g}|dkr�d}ttt	|�t	|���D]}||||k7s�n|dkDr|dz}d|�d�g}||d}||d}t	|�t	|�k(rHtt	|��D]}||||k7s�n|dkDr|dz}|d|�d	�gz
}|d|}|d|}d
}|j�s|j�r.t
t|��}t
t|��}|dgz
}|||j|�|j|��D�cgc]}|jd���c}z
}|Scc}w)
z�Return the explanation for the diff between text.

    Unless --verbose is used this will skip leading and trailing
    characters which are identical to keep the diff minimal.
    r)�ndiffr0�*�
z	Skipping z5 identical leading characters in diff, use -v to showNz6 identical trailing characters in diff, use -v to showTz;Strings contain only whitespace, escaping them using repr()r&)
�difflibr��range�minr>�isspace�reprr �
splitlines�strip)r�r�r�r�r*�i�keependsrBs        rr�r�s�����K���{�
���s�3�t�9�c�%�j�1�2�	�A��A�w�%��(�"��	�
�r�6�
��G�A��A�3�S�T��K����8�D��!�"�I�E��t�9��E�
�"��3�t�9�%�
�����8�u�a�R�y�(��
��2�v��R������s�#9�9� ����C�a�R�y���c��r�
���H��|�|�~������C��I����S��Z� ���U�V�V����%�*�*�8�4�d�o�o�h�6O�P���	
�
�
�4����K����	s�=Ec�p�|dkr
t�sdgSddl}t�j|�j	�}t�j|�j	�}ddg}|j|dj
d�|j||�D��d��j	��|S)	NrzUse -v to get more diffr/z
Full diff:r&c3�<K�|]}|j����y�wrF)�rstrip)�.0rBs  r�	<genexpr>z'_compare_eq_iterable.<locals>.<genexpr>Xs���������
��s��diff)r)�
running_on_cir�r�pformatr�r�r)r�)r�r�r�r�r��left_formatting�right_formattingr*s        rr�r�Es����!�|�M�O�)�*�*��#�o�-�-�d�3�>�>�@�O�$��.�.�u�5�@�@�B���|�$�K������I�I��#�M�M�*:�O�L��
��	
��*�,���rc
�2�t|t�xrt|t�}g}t|�}t|�}tt	||��D]d}||||k7s�|r|||dz}	|||dz}
n
||}	||}
|jd|�d|t
|	���d|t
|
�����n|r|S||z
}|rU|dkDrd}t||�}
nd|z
}d}t||�}
|dk(r||�d||
���gz
}|S|d	||||
�fzgz
}|S)
Nr0z	At index z diff: � != r�Left�Rightz contains one more item: z/%s contains %d more items, first extra item: %s)rG�bytesr>r�r�r7r�r)r�r�r�r��comparing_bytesr*�len_left�	len_rightr��
left_value�right_value�len_diff�
dir_with_more�extras              rr�r�bs���!��u�-�J�*�U�E�2J�O��K��4�y�H��E�
�I�
�3�x��+�
,�����7�e�A�h���"�!�a�!�e�_�
�#�A��A��.��!�!�W�
�#�A�h������A�3����Z� 0�1�2�$�{�4��CT�7U�6V�X�
�
�+�.����)�#�H���a�<�"�M��T�)�_�-�E��8�|�H�#�M��U�8�_�-�E��q�=�� �/�!:�;�u�;M�:N�O��
�K���	
�A� �(�K��,>�?�@��
�K��rc�~�g}|jtd|||��|jtd|||��|S)Nr�r�)r��_set_one_sided_diff�r�r�r�r�r*s     rr�r��sC���K����*�6�4���L�M����*�7�E�4��M�N��rc�*�t|||�}|sdgS|S�Nrv)rr�s     rr�r���$��#�4���<�K��%�&�&��rc�*�t|||�}|sdgS|Sr�)r�r�s     rr�r��r�rc��td|||�S)Nr��r��r�r�r�r�s    rrr�s���w��t�[�A�Arc��td|||�S)Nr�r�r�s    rr�r��s���v�t�U�K�@�@rc��g}||z
}|r<|jd|�d��|D]"}|j|t|����$|S)NzExtra items in the z set:)r7r)�posn�set1�set2r�r*r��items       rr�r��sY���K��$�;�D�����0���e�<�=��	<�D����{�8�D�>�:�;�	<��rc��g}t|�}t|�}|j|�}|D�cic]}||||k(s�|||��}	}|	r|dkr|dt|	��d�gz
}n4|	r2|dgz
}||tj|	��j�z
}|D�chc]}||||k7s�|��}
}|
rA|dgz
}|
D]6}||t
|||i��dz|t
|||i��zgz
}�8||z
}t|�}|rg|jd||dk(rd	nd
fz�|j|tj|D�cic]}|||��
c}��j��||z
}
t|
�}|rg|jd||dk(rd	nd
fz�|j|tj|
D�cic]}|||��
c}��j��|Scc}wcc}wcc}wcc}w)Nrs�	Omitting �! identical items, use -vv to showz
Common items:zDiffering items:r�zLeft contains %d more item%s:r0r/rCzRight contains %d more item%s:)	rS�intersectionr>�pprintr�r�rr7r�)r�r�r�r�r*�set_left�	set_right�common�k�samer��
extra_left�len_extra_left�extra_right�len_extra_rights               rr�r��sL�� �K��4�y�H��E�
�I�
�
"�
"�9�
-�F� &�>�1�$�q�'�U�1�X�*=�A�t�A�w�J�>�D�>���!���)�C��I�;�.O�P�Q�Q��	
���(�(���{�6�>�>�$�#7�8�C�C�E�E���5�!��a��E�!�H�!4�A�5�D�5���*�+�+���	�A���H�a��a��\�2�3����h��5��8�}�5�6�7��
�K�	��I�%�J���_�N�����+��^�q�%8�r�c�B�
C�	
�	�������J�'G�q��4��7�
�'G�H�I�T�T�V�	
��h�&�K��+�&�O�����,��o��&:���D�
E�	
�	�������[�'I���5��8��'I�J�K�V�V�X�	
����G?��6��"(H��(Js"�G*�G*�G/�-G/�
G4�>
G9c�,�t|�sgSt|�r<ddl}|j|�}|D�cgc]}|js�|j
��}}nXt
|�r3|j}|D�cgc]}t|d�s�|j
��}}nt|�r
|j}nJ�d}	g}
g}|D]>}t||�t||�k(r|
j|��.|j|��@g}|
s|r|dgz
}|
r$|dkr|jdt|
��d��n4|
r2|dgz
}||tj|
��j�z
}|r�|d	gz
}||tj|��j�z
}|D]p}t||�}
t||�}|dd
|�d�|	�|�d|t!|
���d
|t!|����gz
}|t#|
|||�D�cgc]}|	|z��	c}z
}�r|Scc}wcc}wcc}w)Nr�eqr;r/rsr�r�zMatching attributes:zDiffering attributes:z$Drill down into differing attribute �:z: r�)rnr`�dataclasses�fields�compare�namercrbrYr\rWr7r>r�r�r�r�r})r�r�r�r�r��
all_fields�info�fields_to_check�fieldrDr�r�r*�
field_left�field_rightrBs                rr�r�sB���$���	����� �'�'��-�
�1;�L��t�|�|�4�9�9�L��L�	����)�)�
�3=�V�%���PT�AU�5�:�:�V��V�	�d�	��,�,���u�
�F�
�D�
�D� ����4���7�5�%�#8�8��K�K����K�K���	��K��t���t�����!�����Y�s�4�y�k�1R�S�T�	
��.�/�/���{�6�>�>�$�#7�8�C�C�E�E����/�0�0���{�6�>�>�$�#7�8�C�C�E�E���
	�E� ��u�-�J�!�%��/�K���6�u�g�Q�?��(�5�'��K��Z�0@�$A�#B�$�{�SW�Xc�Sd�Ge�Ff�g��
�K�

�+���[�'������
��
�K�
	����WM��W��Ds�H�H�0H�H�2Hc�d�|j|�}|d|}||t|�zd}||z}t|||�}t|d���d�g}|D]`}	|	j	d�r�|	j	d�r�'|	j	d�r|jd|	ddz��P|j|	��b|S)	Nr�)rtz is contained here:�Skippingz- z+ r;rs)�findr>r�rr=r7)
�term�textr��index�head�tail�correct_textr��newdiffrBs
          rr~r~Ks����I�I�d�O�E����<�D����D�	�!�#�$�D��$�;�L��d�L�'�2�D��4��,�-�-@�A�B�G��!���?�?�:�&���?�?�4� ���?�?�4� ��N�N�4�$�q�r�(�?�+��N�N�4� �!��Nrc�.�ddg}td�|D��S)z0Check if we're currently running on a CI system.�CI�BUILD_NUMBERc3�@K�|]}|tjv���y�wrF)�os�environ)r��vars  rr�z running_on_ci.<locals>.<genexpr>as����5�S�s�b�j�j� �5�s�)�any)�env_varss rr�r�^s���n�%�H��5�H�5�5�5r)r*r r!r )r*r r!�	list[str])r+z
Sequence[str]r!r)rKrr!�bool)r[rr!r)r[�objectr!r)F)
r�r r�rr�rrqrr!zlist[str] | None)r)
r�rr�rr�rr��intr!r)r�r r�r r�rr!r)
r��
Iterable[Any]r�r	r�rr�rr!r)
r��
Sequence[Any]r�r
r�rr�rr!r)
r��AbstractSet[Any]r�rr�rr�rr!r)
r�r r�rr�rr�rr!r)
r��Mapping[Any, Any]r�rr�rr�rr!r)r�r r�r r�rr!r)r!r)<�__doc__�
__future__r�collections.abcrHrr��typingrrrrrr	r
r�unicodedatarr�r
�
_pytest._code�_pytest._io.pprintr�_pytest._io.safereprrr�_pytest.configrr�__annotations__rrrr-r'r(rLrNrQrUr\r`rcrgrnr�r}r�r�r�r�r�r�rr�r�r�r�r~r�rrr�<module>rst��(�"��	�
���������!���,�)�3�!�DH��@�G�;?��7�>�����6�X�6�
��" �FN���+�P�B�=���	��	��,?D�C#��C#��C#�'*�C#�7;�C#��C#�NHI�"�

�"��"�(6�"�AD�"��"�J-�h�	�
���� ���	�
��B�	:�
�:��:� �:��	:�
�:�B�		�
�	��	� �	��		�
�	� �		�
�	��	� �	��		�
�	� �		�
�	��	� �	��		�
�	� �	B�
�B��B� �B��	B�
�B��	A�
�A��A� �A��	A�
�A��

��
���� �	�
��&�	-�
�-��-� �-��	-�
�-�`4�

�4��4�(6�4�AD�4��4�n�&6r

Youez - 2016 - github.com/yon3zu
LinuXploit