§
    4›j¬g  ã                  ó„  — d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d dlZd dlZd d	lmZ d d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlZd dlZd dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm Z  d dlm!Z! d dl"m#Z# d dl"m$Z$ d dl%m&Z& d dl'm(Z( d dl)m*Z* d dl)m+Z+ d dl)m,Z, d dl-m.Z. d dl/m0Z0 d d l1m2Z2 d d!l3m4Z4 erd d"l5m6Z6 d d#l7m8Z8 d$Z9 eej:        ¦  «        j;        Z< ed%¦  «        Z=dId.„Z> ed/d0¬1¦  «        Z? G d2„ d3ej@        ¦  «        ZA G d4„ d0ejB        eA¬5¦  «        ZCdJd8„ZD G d9„ d:eCejB        ¦  «        ZE e
d;¬<¦  «        dKd@„¦   «         ZF G dA„ dBeEejB        ¦  «        ZG G dC„ dDeGejB        ¦  «        ZH G dE„ dFeGejB        ¦  «        ZI G dG„ dHeCejB        ¦  «        ZJdS )Lé    )ÚannotationsN)ÚCallable)ÚIterable)ÚIterator)ÚMutableMapping)Úcached_property)Ú	lru_cache)ÚPath)ÚAny)Úcast)ÚNoReturn)Úoverload)ÚTYPE_CHECKING)ÚTypeVar)Úgetfslineno)ÚExceptionInfo)ÚTerminalRepr)Ú	Traceback)ÚTracebackStyle)ÚLEGACY_PATH)Ú	signature)ÚConfig)ÚConftestImportFailure)Ú_check_path)ÚNODE_CTOR_FSPATH_ARG)ÚMark)ÚMarkDecorator)ÚNodeKeywords)Úfail)Úabsolutepath)ÚStash)ÚPytestWarning)ÚSelf)ÚSessionú/Ú_TÚ	node_typeú
type[Node]ÚpathúPath | NoneÚfspathúLEGACY_PATH | NoneÚreturnr
   c                ó´   — |�.t          j        t          j        | j        ¬¦  «        d¬¦  «         |�|�t          ||¦  «         |S |€J ‚t          |¦  «        S )N)Únode_type_nameé   )Ú
stacklevel)ÚwarningsÚwarnr   ÚformatÚ__name__r   r
   )r'   r)   r+   s      úJ/home/lighthouse/health/venv/lib/python3.11/site-packages/_pytest/nodes.pyÚ_imply_pathr7   <   s~   € ð
 ÐÝŒÝ Ô'Ø(Ô1ðñ ô ð ð		
ñ 	
ô 	
ð 	
ð ÐØÐÝ˜˜fÑ%Ô%Ð%ØˆàÐ!Ð!Ð!Ý�F‰|Œ|Ðó    Ú	_NodeTypeÚNode)Úboundc                  ó,   ‡ — e Zd ZdZd	d„Zd
ˆ fd„Zˆ xZS )ÚNodeMetaa½  Metaclass used by :class:`Node` to enforce that direct construction raises
    :class:`Failed`.

    This behaviour supports the indirection introduced with :meth:`Node.from_parent`,
    the named constructor to be used instead of direct construction. The design
    decision to enforce indirection with :class:`NodeMeta` was made as a
    temporary aid for refactoring the collection tree, which was diagnosed to
    have :class:`Node` objects whose creational patterns were overly entangled.
    Once the refactoring is complete, this metaclass can be removed.

    See https://github.com/pytest-dev/pytest/projects/3 for an overview of the
    progress on detangling the :class:`Node` classes.
    r-   r   c                ór   — d                      | j        › d| j        › �¬¦  «        }t          |d¬¦  «         d S )NzÉDirect construction of {name} has been deprecated, please use {name}.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.ú.©ÚnameF)Úpytrace)r4   Ú
__module__r5   r   )ÚclsÚkÚkwÚmsgs       r6   Ú__call__zNodeMeta.__call__c   sJ   € ð!÷ Š&˜œÐ8Ð8¨#¬,Ð8Ð8ˆ&Ñ
9Ô
9ð 	õ 	ˆS˜%Ð Ñ Ô Ð Ð Ð r8   rD   útype[_T]r&   c           
     ór  •‡— 	  t          ¦   «         j        |i |¤ŽS # t          $ r� t          t	          | d¦  «        ¦  «        Šˆfd„|                     ¦   «         D ¦   «         }ddlm} t          j	         || › dt          |¦  «        › d�¦  «        ¦  «          t          ¦   «         j        |i |¤ŽcY S w xY w)NÚ__init__c                ó.   •— i | ]\  }}|‰j         v ¯||“ŒS © )Ú
parameters)Ú.0rE   ÚvÚsigs      €r6   ú
<dictcomp>z$NodeMeta._create.<locals>.<dictcomp>q   s+   ø€ ÐKÐKÐK¡  A°q¸C¼NÐ7JÐ7J˜˜1Ð7JÐ7JÐ7Jr8   é   )ÚPytestDeprecationWarningz7 is not using a cooperative constructor and only takes zŒ.
See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details.)ÚsuperrH   Ú	TypeErrorr   ÚgetattrÚitemsÚwarning_typesrT   r2   r3   Úset)rD   rE   rF   Úknown_kwrT   rQ   Ú	__class__s        @€r6   Ú_createzNodeMeta._createl   sú   øø€ ð	4Ø#•5‘7”7Ô# QÐ-¨"Ð-Ð-Ð-øÝð 	4ð 	4ð 	4Ý�G C¨Ñ4Ô4Ñ5Ô5ˆCØKÐKÐKÐK¨¯ª©¬ÐKÑKÔKˆHØ?Ð?Ð?Ð?Ð?Ð?åŒMØ(Ð(Øð (ð (ÕSVÐW_ÑS`ÔS`ð (ð (ð (ñô ñô ð ð $•5‘7”7Ô# QÐ3¨(Ð3Ð3Ð3Ð3Ð3ð	4øøøs   „ �BB6Â5B6)r-   r   )rD   rI   r-   r&   )r5   rC   Ú__qualname__Ú__doc__rH   r]   Ú__classcell__©r\   s   @r6   r=   r=   T   s[   ø€ € € € € ðð ð!ð !ð !ð !ð4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4r8   r=   c                  óR  — e Zd ZU dZded<   dZ	 	 	 	 	 	 dLdMd„ZedNd„¦   «         Ze	dOd„¦   «         Z
dPd„ZdQd„Ze	dPd„¦   «         ZdRd „ZdSd!„ZdSd"„ZdTd$„ZdUd&„ZdVdWd,„ZdXdYd.„Z	 dXdZd0„Zed[d2„¦   «         Zed\d5„¦   «         ZdXd]d6„Zd^d8„Zd_d:„Zd`d=„ZdadA„ZdbdE„Z	 dXdcdI„Z	 dXdddK„ZdS )er:   zÊBase class of :class:`Collector` and :class:`Item`, the components of
    the test collection tree.

    ``Collector``\'s are the internal nodes of the tree, and ``Item``\'s are the
    leaf nodes.
    r   r+   )Ú__dict__Ú_nodeidÚ_storeÚconfigrA   Úparentr)   ÚsessionNrA   Ústrrg   úNode | Nonerf   úConfig | Nonerh   úSession | Noner,   r)   r*   Únodeidú
str | Noner-   ÚNonec                óN  — || _         || _        |r|| _        n|st          d¦  «        ‚|j        | _        |r|| _        n|st          d¦  «        ‚|j        | _        |€|€t          |dd ¦  «        }t          t          | ¦  «        ||¬¦  «        | _        t          | ¦  «        | _
        g | _        t          ¦   «         | _        |�d|vsJ ‚|| _        n2| j        st          d¦  «        ‚| j        j        dz   | j         z   | _        t!          ¦   «         | _        | j        | _        d S )Nz!config or parent must be providedz"session or parent must be providedr)   ©r+   z::()z!nodeid or parent must be providedz::)rA   rg   rf   rV   rh   rW   r7   Útyper)   r   ÚkeywordsÚown_markersrZ   Úextra_keyword_matchesrd   rm   r!   Ústashre   )ÚselfrA   rg   rf   rh   r+   r)   rm   s           r6   rK   zNode.__init__œ   sC  € ð ˆŒ	ð ˆŒàð 	(à"(ˆDŒKˆKàð EÝÐ CÑDÔDÐDØ œ-ˆDŒKàð 	*à$+ˆDŒLˆLàð FÝÐ DÑEÔEÐEØ!œ>ˆDŒLàˆ<˜F˜NÝ˜6 6¨4Ñ0Ô0ˆDå"-­d°4©j¬j¸$ÀvÐ"NÑ"NÔ"NˆŒ	õ 3?¸tÑ2DÔ2DˆŒð (*ˆÔõ 03©u¬uˆÔ"àÐØ Ð'Ð'Ð'Ð'Ø!ˆDŒLˆLà”;ð EÝÐ CÑDÔDÐDØœ;Ô-°Ñ4°t´yÑ@ˆDŒLõ "™GœGˆŒ
à”jˆŒˆˆr8   r#   c                ól   — d|v rt          d¦  «        ‚d|v rt          d¦  «        ‚ | j        dd|i|¤ŽS )a:  Public constructor for Nodes.

        This indirection got introduced in order to enable removing
        the fragile logic from the node constructors.

        Subclasses can use ``super().from_parent(...)`` when overriding the
        construction.

        :param parent: The parent node of this Node.
        rf   z.config is not a valid argument for from_parentrh   z/session is not a valid argument for from_parentrg   rM   )rV   r]   )rD   rg   rF   s      r6   Úfrom_parentzNode.from_parentÙ   sQ   € ð �rˆ>ˆ>ÝÐLÑMÔMÐMØ˜ˆ?ˆ?ÝÐMÑNÔNÐNØˆsŒ{Ð/Ð/ &Ð/¨BÐ/Ð/Ð/r8   úpluggy.HookRelayc                ó@   — | j                              | j        ¦  «        S )z6fspath-sensitive hook proxy used to call pytest hooks.)rh   Úgethookproxyr)   ©rw   s    r6   Úihookz
Node.ihookë   s   € ð Œ|×(Ò(¨¬Ñ3Ô3Ð3r8   c                ó`   — d                      | j        j        t          | dd ¦  «        ¦  «        S )Nz<{} {}>rA   )r4   r\   r5   rW   r}   s    r6   Ú__repr__zNode.__repr__ð   s)   € Ø×Ò ¤Ô 7½ÀÀvÈtÑ9TÔ9TÑUÔUÐUr8   ÚwarningÚWarningc                óÐ   — t          |t          ¦  «        st          d|›�¦  «        ‚t          | ¦  «        \  }}|€J ‚t	          j        |dt          |¦  «        |dz   ¬¦  «         dS )aw  Issue a warning for this Node.

        Warnings will be displayed after the test session, unless explicitly suppressed.

        :param Warning warning:
            The warning instance to issue.

        :raises ValueError: If ``warning`` instance is not a subclass of Warning.

        Example usage:

        .. code-block:: python

            node.warn(PytestWarning("some message"))
            node.warn(UserWarning("some message"))

        .. versionchanged:: 6.2
            Any subclass of :class:`Warning` is now accepted, rather than only
            :class:`PytestWarning <pytest.PytestWarning>` subclasses.
        z8warning must be an instance of Warning or subclass, got NrS   )ÚcategoryÚfilenameÚlineno)Ú
isinstancer‚   Ú
ValueErrorÚget_fslocation_from_itemr2   Úwarn_explicitri   )rw   r�   r)   r†   s       r6   r3   z	Node.warnó   sŒ   € õ, ˜'¥7Ñ+Ô+ð 	ÝØVÈ7ÐVÐVñô ð õ 0°Ñ5Ô5‰ˆˆfØÐ!Ð!Ð!ÝÔØØÝ˜‘Y”YØ˜A‘:ð		
ñ 	
ô 	
ð 	
ð 	
ð 	
r8   c                ó   — | j         S )z;A ::-separated string denoting its collection tree address.)rd   r}   s    r6   rm   zNode.nodeid  s   € ð Œ|Ðr8   Úintc                ó*   — t          | j        ¦  «        S ©N)Úhashrd   r}   s    r6   Ú__hash__zNode.__hash__  s   € Ý�D”LÑ!Ô!Ð!r8   c                ó   — d S rŽ   rM   r}   s    r6   Úsetupz
Node.setup   ó   € Øˆr8   c                ó   — d S rŽ   rM   r}   s    r6   ÚteardownzNode.teardown#  r“   r8   úIterator[Node]c              #  ó0   K  — | }|�|V — |j         }|­dS dS )zšIterate over all parent collectors starting from and including self
        up to the root of the collection tree.

        .. versionadded:: 8.1
        N)rg   )rw   rg   s     r6   Úiter_parentszNode.iter_parents&  s7   è è € ð #ˆØÐ ØˆLˆLˆLØ”]ˆFð Ð Ð Ð Ð Ð r8   ú
list[Node]c                óv   — g }| }|�|                      |¦  «         |j        }|­|                     ¦   «          |S )zxReturn a list of all parent collectors starting from the root of the
        collection tree down to and including self.)Úappendrg   Úreverse)rw   ÚchainÚitems      r6   Ú	listchainzNode.listchain1  sI   € ð ˆØ ˆØÐØ�LŠL˜ÑÔÐØ”;ˆDð Ðð 	�Š‰ŒˆØˆr8   TÚmarkerústr | MarkDecoratorr›   Úboolc                óP  — ddl m} t          |t          ¦  «        r|}n5t          |t          ¦  «        rt          ||¦  «        }nt          d¦  «        ‚|| j        |j        <   |r!| j	         
                    |j        ¦  «         dS | j	                             d|j        ¦  «         dS )zµDynamically add a marker object to the node.

        :param marker:
            The marker.
        :param append:
            Whether to append the marker, or prepend it.
        r   )ÚMARK_GENz'is not a string or pytest.mark.* MarkerN)Ú_pytest.markr¤   r‡   r   ri   rW   rˆ   rs   rA   rt   r›   ÚmarkÚinsert)rw   r    r›   r¤   Úmarker_s        r6   Ú
add_markerzNode.add_marker<  s¹   € ð 	*Ð)Ð)Ð)Ð)Ð)å�f�mÑ,Ô,ð 	HØˆGˆGÝ˜¥Ñ$Ô$ð 	HÝ˜h¨Ñ/Ô/ˆGˆGåÐFÑGÔGÐGØ&-ˆŒ�g”lÑ#Øð 	5ØÔ×#Ò# G¤LÑ1Ô1Ð1Ð1Ð1àÔ×#Ò# A w¤|Ñ4Ô4Ð4Ð4Ð4r8   úIterator[Mark]c                óB   — d„ |                       |¬¦  «        D ¦   «         S )z²Iterate over all markers of the node.

        :param name: If given, filter the results by the name attribute.
        :returns: An iterator of the markers of the node.
        c              3  ó&   K  — | ]}|d          V — ŒdS )rS   NrM   ©rO   Úxs     r6   ú	<genexpr>z$Node.iter_markers.<locals>.<genexpr>X  s&   è è € ÐEÐE˜��!”ÐEÐEÐEÐEÐEÐEr8   r@   )Úiter_markers_with_node©rw   rA   s     r6   Úiter_markerszNode.iter_markersR  s*   € ð FÐE˜d×9Ò9¸tÐ9ÑDÔDÐEÑEÔEÐEr8   úIterator[tuple[Node, Mark]]c              #  ó†   K  — |                       ¦   «         D ])}|j        D ]}|�t          |dd¦  «        |k    r||fV — Œ Œ*dS )z®Iterate over all markers of the node.

        :param name: If given, filter the results by the name attribute.
        :returns: An iterator of (node, mark) tuples.
        NrA   )r˜   rt   rW   )rw   rA   Únoder¦   s       r6   r°   zNode.iter_markers_with_nodeZ  sp   è è € ð ×%Ò%Ñ'Ô'ð 	%ð 	%ˆDØÔ(ð %ð %�Ø�<¥7¨4°¸Ñ#>Ô#>À$Ò#FÐ#FØ ˜*Ð$Ð$Ð$øð%ð	%ð 	%r8   úMark | Nonec                ó   — d S rŽ   rM   r±   s     r6   Úget_closest_markerzNode.get_closest_markerg  s   € Ø<?¸Cr8   Údefaultr   c                ó   — d S rŽ   rM   ©rw   rA   r¹   s      r6   r¸   zNode.get_closest_markerj  s   € ØDGÀCr8   c                óJ   — t          |                      |¬¦  «        |¦  «        S )zûReturn the first marker matching the name, from closest (for
        example function) to farther level (for example module level).

        :param default: Fallback return value if no marker was found.
        :param name: Name to filter by.
        r@   )Únextr²   r»   s      r6   r¸   zNode.get_closest_markerm  s%   € õ �D×%Ò%¨4Ð%Ñ0Ô0°'Ñ:Ô:Ð:r8   úset[str]c                ó„   — t          ¦   «         }|                      ¦   «         D ]}|                     |j        ¦  «         Œ|S )z;Return a set of all extra keywords in self and any parents.)rZ   rŸ   Úupdateru   )rw   Úextra_keywordsrž   s      r6   ÚlistextrakeywordszNode.listextrakeywordsv  sD   € å#&¡5¤5ˆØ—N’NÑ$Ô$ð 	>ð 	>ˆDØ×!Ò! $Ô"<Ñ=Ô=Ð=Ð=ØÐr8   ú	list[str]c                ó>   — d„ |                       ¦   «         D ¦   «         S )Nc                ó   — g | ]	}|j         ‘Œ
S rM   r@   r­   s     r6   ú
<listcomp>z"Node.listnames.<locals>.<listcomp>~  s   € Ð1Ð1Ð1˜1�”Ð1Ð1Ð1r8   )rŸ   r}   s    r6   Ú	listnameszNode.listnames}  s    € Ø1Ð1 §¢Ñ 0Ô 0Ð1Ñ1Ô1Ð1r8   ÚfinúCallable[[], object]c                óF   — | j         j                             || ¦  «         dS )zÜRegister a function to be called without arguments when this node is
        finalized.

        This method can only be called when this node is active
        in a setup chain, for example during self.setup().
        N)rh   Ú_setupstateÚaddfinalizer)rw   rÈ   s     r6   rÌ   zNode.addfinalizer€  s%   € ð 	ŒÔ ×-Ò-¨c°4Ñ8Ô8Ð8Ð8Ð8r8   rD   útype[_NodeType]ú_NodeType | Nonec                ó\   — |                       ¦   «         D ]}t          ||¦  «        r|c S ŒdS )z¿Get the closest parent node (including self) which is an instance of
        the given class.

        :param cls: The node class to search for.
        :returns: The node, if found.
        N)r˜   r‡   )rw   rD   rµ   s      r6   Ú	getparentzNode.getparent‰  sD   € ð ×%Ò%Ñ'Ô'ð 	ð 	ˆDÝ˜$ Ñ$Ô$ð Ø���ðàˆtr8   ÚexcinfoúExceptionInfo[BaseException]r   c                ó   — |j         S rŽ   )Ú	traceback)rw   rÑ   s     r6   Ú_traceback_filterzNode._traceback_filter•  s   € ØÔ Ð r8   ÚstyleúTracebackStyle | Noner   c           	     ó\  — ddl m} t          |j        t          ¦  «        rt          j        |j        j        ¦  «        }t          |j        t          j	        ¦  «        r|j        j
        sd}t          |j        |¦  «        r|j                             ¦   «         S | j                             dd¦  «        rd}d}n| j        }|dk    rd}|€$| j                             dd¦  «        d	k    rd	}nd}| j                             ¦   «         d
k    rd}nd}| j                             ¦   «         dk    rdnd}	 t!          t#          j        ¦   «         ¦  «        | j        j        j        k    }n# t*          $ r d}Y nw xY w|                     d|| j                             dd¦  «        ||||¬¦  «        S )Nr   )ÚFixtureLookupErrorÚvalueÚ	fulltraceFÚlongÚautoÚtbstyleÚshortrS   Té   Ú
showlocals)ÚfuncargsÚabspathrá   rÖ   ÚtbfilterÚtruncate_localsÚtruncate_args)Ú_pytest.fixturesrÙ   r‡   rÚ   r   r   Úfrom_exceptionÚcauser   Ú	ExceptionrB   Ú
formatreprrf   Ú	getoptionrÕ   Úget_verbosityr
   ÚosÚgetcwdÚinvocation_paramsÚdirÚOSErrorÚgetrepr)rw   rÑ   rÖ   rÙ   rä   rå   ræ   rã   s           r6   Ú_repr_failure_pyzNode._repr_failure_py˜  sÓ  € ð
 	8Ð7Ð7Ð7Ð7Ð7å�g”mÕ%:Ñ;Ô;ð 	HÝ#Ô2°7´=Ô3FÑGÔGˆGÝ�g”m¥T¤^Ñ4Ô4ð 	 Ø”=Ô(ð  Ø�Ý�g”mÐ%7Ñ8Ô8ð 	.Ø”=×+Ò+Ñ-Ô-Ð-ð Œ;× Ò  ¨eÑ4Ô4ð 	ØˆEØˆHˆHàÔ-ˆHØ˜ŠˆØ�àˆ=ØŒ{×$Ò$ Y°Ñ7Ô7¸7ÒBÐBØ��à�àŒ;×$Ò$Ñ&Ô&¨Ò*Ð*Ø#ˆOˆOà"ˆOà!%¤×!:Ò!:Ñ!<Ô!<¸qÒ!@Ð!@˜˜Àdˆð	Ý�2œ9™;œ;Ñ'Ô'¨4¬;Ô+HÔ+LÒLˆGˆGøÝð 	ð 	ð 	ØˆGˆGˆGð	øøøð �ŠØØØ”{×,Ò,¨\¸5ÑAÔAØØØ+Ø'ð ñ 
ô 
ð 	
s   Ä33E' Å'E6Å5E6ústr | TerminalReprc                ó.   — |                       ||¦  «        S )z¯Return a representation of a collection or test failure.

        .. seealso:: :ref:`non-python tests`

        :param excinfo: Exception information for the failure.
        )rô   )rw   rÑ   rÖ   s      r6   Úrepr_failurezNode.repr_failureÒ  s   € ð ×$Ò$ W¨eÑ4Ô4Ð4r8   )NNNNNN)rA   ri   rg   rj   rf   rk   rh   rl   r+   r,   r)   r*   rm   rn   r-   ro   )rg   r:   r-   r#   )r-   rz   )r-   ri   )r�   r‚   r-   ro   )r-   rŒ   ©r-   ro   )r-   r–   )r-   r™   )T)r    r¡   r›   r¢   r-   ro   rŽ   )rA   rn   r-   rª   )rA   rn   r-   r³   )rA   ri   r-   r¶   )rA   ri   r¹   r   r-   r   )rA   ri   r¹   r¶   r-   r¶   )r-   r¾   )r-   rÃ   )rÈ   rÉ   r-   ro   )rD   rÍ   r-   rÎ   ©rÑ   rÒ   r-   r   )rÑ   rÒ   rÖ   r×   r-   r   )rÑ   rÒ   rÖ   r×   r-   rõ   )r5   rC   r^   r_   Ú__annotations__Ú	__slots__rK   Úclassmethodry   Úpropertyr~   r€   r3   rm   r�   r’   r•   r˜   rŸ   r©   r²   r°   r   r¸   rÂ   rÇ   rÌ   rÐ   rÕ   rô   r÷   rM   r8   r6   r:   r:   €   s‘  € € € € € € ðð ð ÐÐÑð	€Ið #Ø $Ø"&Ø%)Ø Ø!ð;!ð ;!ð ;!ð ;!ð ;!ðz ð0ð 0ð 0ñ „[ð0ð" ð4ð 4ð 4ñ „Xð4ðVð Vð Vð Vð!
ð !
ð !
ð !
ðJ ðð ð ñ „Xðð"ð "ð "ð "ðð ð ð ðð ð ð ð	#ð 	#ð 	#ð 	#ð	ð 	ð 	ð 	ð5ð 5ð 5ð 5ð 5ð,Fð Fð Fð Fð Fð "&ð%ð %ð %ð %ð %ð Ø?Ð?Ð?ñ „XØ?àØGÐGÐGñ „XØGð;ð ;ð ;ð ;ð ;ðð ð ð ð2ð 2ð 2ð 2ð9ð 9ð 9ð 9ð
ð 
ð 
ð 
ð!ð !ð !ð !ð (,ð8
ð 8
ð 8
ð 8
ð 8
ðz (,ð5ð 5ð 5ð 5ð 5ð 5ð 5r8   )Ú	metaclassrµ   útuple[str | Path, int | None]c                ó¦   — t          | dd¦  «        }|�
|dd…         S t          | dd¦  «        }|�t          |¦  «        S t          | dd¦  «        dfS )a  Try to extract the actual location from a node, depending on available attributes:

    * "location": a pair (path, lineno)
    * "obj": a Python object that the node wraps.
    * "path": just a path

    :rtype: A tuple of (str|Path, int) with filename and 0-based line number.
    ÚlocationNrà   Úobjr)   zunknown locationéÿÿÿÿ)rW   r   )rµ   r  r  s      r6   r‰   r‰   à  se   € õ 4;¸4ÀÈTÑ3RÔ3R€HØÐØ˜˜˜Œ|ÐÝ
�$˜˜tÑ
$Ô
$€CØ
€Ý˜3ÑÔÐÝ�4˜Ð!3Ñ4Ô4°bÐ8Ð8r8   c                  ó`   — e Zd ZdZ G d„ de¦  «        Zej        dd„¦   «         Zdd
„Z	dd„Z
dS )Ú	Collectorz‰Base class of all collectors.

    Collector create children through `collect()` and thus iteratively build
    the collection tree.
    c                  ó   — e Zd ZdZdS )úCollector.CollectErrorz6An error during collection, contains a custom message.N©r5   rC   r^   r_   rM   r8   r6   ÚCollectErrorr  ú  s   € € € € € ØDÐDÐDÐDr8   r	  r-   úIterable[Item | Collector]c                ó    — t          d¦  «        ‚)z;Collect children (items and collectors) for this collector.Úabstract©ÚNotImplementedErrorr}   s    r6   ÚcollectzCollector.collectý  s   € õ " *Ñ-Ô-Ð-r8   rÑ   rÒ   rõ   c                ó"  — t          |j        | j        ¦  «        r<| j                             dd¦  «        s!|j        }t          |j        d         ¦  «        S | j                             dd¦  «        }|dk    rd}|                      ||¬¦  «        S )zyReturn a representation of a collection failure.

        :param excinfo: Exception information for the failure.
        rÛ   Fr   rÞ   rÝ   rß   )rÖ   )r‡   rÚ   r	  rf   rì   ri   Úargsrô   )rw   rÑ   ÚexcrÞ   s       r6   r÷   zCollector.repr_failure  sš   € õ �g”m TÔ%6Ñ7Ô7ð 	$ÀÄ×@UÒ@UØ˜ñA
ô A
ð 	$ð ”-ˆCÝ�s”x ”{Ñ#Ô#Ð#ð ”+×'Ò'¨	°6Ñ:Ô:ˆØ�fÒÐØˆGà×$Ò$ W°GÐ$Ñ<Ô<Ð<r8   r   c                óà   — t          | d¦  «        rX|j        }|                     | j        ¬¦  «        }||k    r|                     t          ¬¦  «        }|                     |¦  «        S |j        S )Nr)   ©r)   )Úexcludepath)ÚhasattrrÔ   Úcutr)   ÚtracebackcutdirÚfilter)rw   rÑ   rÔ   Ú
ntracebacks       r6   rÕ   zCollector._traceback_filter  sl   € Ý�4˜Ñ Ô ð 	.ØÔ)ˆIØ"Ÿš¨D¬I˜Ñ6Ô6ˆJØ˜YÒ&Ð&Ø'Ÿ^š^½˜^ÑHÔH�
Ø×$Ò$ WÑ-Ô-Ð-ØÔ Ð r8   N)r-   r
  )rÑ   rÒ   r-   rõ   rù   )r5   rC   r^   r_   rê   r	  ÚabcÚabstractmethodr  r÷   rÕ   rM   r8   r6   r  r  ó  sœ   € € € € € ðð ðEð Eð Eð Eð E�yñ Eô Eð Eð 	Ôð.ð .ð .ñ Ôð.ð
=ð =ð =ð =ð*!ð !ð !ð !ð !ð !r8   r  iè  )ÚmaxsizeÚinitial_pathsúfrozenset[Path]rn   c                óv   — || v rdS |j         D ]*}|| v r$t          |                     |¦  «        ¦  «        c S Œ+d S )NÚ )Úparentsri   Úrelative_to)r  r)   rg   s      r6   Ú_check_initialpaths_for_relpathr$  "  s^   € ð ˆ}ÐÐØˆrà”,ð 1ð 1ˆØ�]Ð"Ð"Ý�t×'Ò'¨Ñ/Ô/Ñ0Ô0Ð0Ð0Ð0ð #ð ˆ4r8   c                  óZ   ‡ — e Zd ZdZ	 	 	 	 	 	 	 	 ddˆ fd„Zedddœdˆ fd„¦   «         Zˆ xZS )ÚFSCollectorz%Base class for filesystem collectors.Nr+   r,   Úpath_or_parentúPath | Node | Noner)   r*   rA   rn   rg   rj   rf   rk   rh   rl   rm   r-   ro   c	                ól  •— |rJt          |t          ¦  «        r|�J ‚t          t          |¦  «        }nt          |t          ¦  «        r|�J ‚|}t          t          | ¦  «        ||¬¦  «        }|€t|j        }|�k|j        |k    r`	 | 	                    |j        ¦  «        }	t          |	¦  «        }n# t          $ r Y nw xY w|                     t          j        t          ¦  «        }|| _        |€|€J ‚|j        }|€”	 t          | j         	                    |j        j        ¦  «        ¦  «        }n%# t          $ r t'          |j        |¦  «        }Y nw xY w|r:t          j        t          k    r%|                     t          j        t          ¦  «        }t+          ¦   «                              ||||||¬¦  «         d S )Nrq   )rA   rg   rf   rh   rm   r)   )r‡   r:   r   r&  r
   r7   rr   rA   r)   r#  ri   rˆ   Úreplacerî   ÚsepÚSEPrh   rf   Úrootpathr$  Ú_initialpathsrU   rK   )rw   r+   r'  r)   rA   rg   rf   rh   rm   Úrelr\   s             €r6   rK   zFSCollector.__init__3  sÝ  ø€ ð ð 	&Ý˜.­$Ñ/Ô/ð &Ø�~�~�~Ý�k¨>Ñ:Ô:��Ý˜N­DÑ1Ô1ð &Ø�|�|�|Ø%�å�4 ™:œ: t°FÐ;Ñ;Ô;ˆØˆ<Ø”9ˆDØÐ! f¤k°TÒ&9Ð&9ð$Ø×*Ò*¨6¬;Ñ7Ô7�Cõ ˜s™8œ8�D�Døõ "ð ð ð Ø�Dðøøøð —|’|¥B¤F­CÑ0Ô0�ØˆŒ	àˆ?ØÐ%Ð%Ð%Ø”nˆGàˆ>ðVÝ˜TœY×2Ò2°7´>Ô3JÑKÔKÑLÔL��øÝð Vð Vð VÝ8¸Ô9NÐPTÑUÔU���ðVøøøð ð 5�"œ&¥Cš-˜-ØŸš­¬µÑ4Ô4�å‰Œ×ÒØØØØØØð 	ñ 	
ô 	
ð 	
ð 	
ð 	
s$   ÂB. Â.
B;Â:B;Ã:1D, Ä,EÅE)r+   r)   r#   c               ó>   •—  t          ¦   «         j        d|||dœ|¤ŽS )zThe public constructor.)rg   r+   r)   rM   )rU   ry   )rD   rg   r+   r)   rF   r\   s        €r6   ry   zFSCollector.from_parenti  s+   ø€ ð #�u‰wŒwÔ"ÐQ¨&¸ÀdÐQÐQÈbÐQÐQÐQr8   )NNNNNNNN)r+   r,   r'  r(  r)   r*   rA   rn   rg   rj   rf   rk   rh   rl   rm   rn   r-   ro   )r+   r,   r)   r*   r-   r#   )r5   rC   r^   r_   rK   rü   ry   r`   ra   s   @r6   r&  r&  0  s«   ø€ € € € € Ø/Ð/ð &*Ø-1Ø ØØ"Ø $Ø"&Ø!ð4
ð 4
ð 4
ð 4
ð 4
ð 4
ð 4
ðl ð
 &*Ø ð	Rð 	Rð 	Rð 	Rð 	Rð 	Rð 	Rñ „[ð	Rð 	Rð 	Rð 	Rð 	Rr8   r&  c                  ó   — e Zd ZdZdS )ÚFilezOBase class for collecting tests from a file.

    :ref:`non-python tests`.
    Nr  rM   r8   r6   r2  r2  v  s   € € € € € ðð ð ð r8   r2  c                  ó   — e Zd ZdZdS )Ú	Directorya  Base class for collecting files from a directory.

    A basic directory collector does the following: goes over the files and
    sub-directories in the directory and creates collectors for them by calling
    the hooks :hook:`pytest_collect_directory` and :hook:`pytest_collect_file`,
    after checking that they are not ignored using
    :hook:`pytest_ignore_collect`.

    The default directory collectors are :class:`~pytest.Dir` and
    :class:`~pytest.Package`.

    .. versionadded:: 8.0

    :ref:`custom directory collectors`.
    Nr  rM   r8   r6   r4  r4  }  s   € € € € € ðð ð ð r8   r4  c                  ó„   ‡ — e Zd ZdZdZ	 	 	 	 ddˆ fd„Zdd„Zej        dd„¦   «         Z	dd„Z
dd„Zedd„¦   «         Zˆ xZS )ÚItemz�Base class of all test invocation items.

    Note that for a single function there might be multiple test invocation items.
    Nrf   rk   rh   rl   rm   rn   r-   ro   c                óŠ   •—  t          ¦   «         j        ||f|||dœ|¤Ž g | _        g | _        |                      ¦   «          d S )N)rf   rh   rm   )rU   rK   Ú_report_sectionsÚuser_propertiesÚ-_check_item_and_collector_diamond_inheritance)rw   rA   rg   rf   rh   rm   rF   r\   s          €r6   rK   zItem.__init__—  sq   ø€ ð 	�‰ŒÔØØð	
ð ØØð	
ð 	
ð ð	
ð 	
ð 	
ð =?ˆÔð :<ˆÔà×:Ò:Ñ<Ô<Ð<Ð<Ð<r8   c                ó
  — t          | ¦  «        }d}t          ||d¦  «        rdS t          ||d¦  «         d                     d„ |j        D ¦   «         ¦  «        }|r't          j        |j        › d|› d�t          ¦  «         dS dS )	z“
        Check if the current type inherits from both File and Collector
        at the same time, emitting a warning accordingly (#8447).
        Ú)_pytest_diamond_inheritance_warning_shownFNTz, c              3  óN   K  — | ] }t          |t          ¦  «        ¯|j        V — Œ!d S rŽ   )Ú
issubclassr  r5   )rO   Úbases     r6   r¯   zEItem._check_item_and_collector_diamond_inheritance.<locals>.<genexpr>Ä  sG   è è € ð 
ð 
Ø"µzÀ$Í	Ñ7RÔ7Rð
ØŒMð
ð 
ð 
ð 
ð 
ð 
r8   zF is an Item subclass and should not be a collector, however its bases zõ are collectors.
Please split the Collectors and the Item into separate node types.
Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html
example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/)	rr   rW   ÚsetattrÚjoinÚ	__bases__r2   r3   r5   r"   )rw   rD   Ú	attr_nameÚproblemss       r6   r:  z2Item._check_item_and_collector_diamond_inheritance´  sÐ   € õ
 �4‰jŒjˆð @ˆ	Ý�3˜	 5Ñ)Ô)ð 	ØˆFÝ��Y Ñ%Ô%Ð%à—9’9ð 
ð 
Ø&)¤mð
ñ 
ô 
ñ 
ô 
ˆð ð 	ÝŒMØ”<ð gð gØ%-ðgð gð gõ
 ñô ð ð ð ð	ð 	r8   c                ó    — t          d¦  «        ‚)zƒRun the test case for this item.

        Must be implemented by subclasses.

        .. seealso:: :ref:`non-python tests`
        z,runtest must be implemented by Item subclassr  r}   s    r6   ÚruntestzItem.runtestÑ  s   € õ "Ð"PÑQÔQÐQr8   Úwhenri   ÚkeyÚcontentc                óH   — |r| j                              |||f¦  «         dS dS )a  Add a new report section, similar to what's done internally to add
        stdout and stderr captured output::

            item.add_report_section("call", "stdout", "report section contents")

        :param str when:
            One of the possible capture states, ``"setup"``, ``"call"``, ``"teardown"``.
        :param str key:
            Name of the section, can be customized at will. Pytest uses ``"stdout"`` and
            ``"stderr"`` internally.
        :param str content:
            The full contents as a string.
        N)r8  r›   )rw   rG  rH  rI  s       r6   Úadd_report_sectionzItem.add_report_sectionÛ  s:   € ð ð 	?ØÔ!×(Ò(¨$°°WÐ)=Ñ>Ô>Ð>Ð>Ð>ð	?ð 	?r8   ú.tuple[os.PathLike[str] | str, int | None, str]c                ó   — | j         ddfS )aP  Get location information for this item for test reports.

        Returns a tuple with three elements:

        - The path of the test (default ``self.path``)
        - The 0-based line number of the test (default ``None``)
        - A name of the test to be shown (default ``""``)

        .. seealso:: :ref:`non-python tests`
        Nr!  r  r}   s    r6   Ú
reportinfozItem.reportinfoì  s   € ð Œy˜$ Ð"Ð"r8   útuple[str, int | None, str]c                óæ   — |                       ¦   «         }t          |d         ¦  «        }| j                             |¦  «        }t	          |d         ¦  «        t
          u sJ ‚||d         |d         fS )zÊ
        Returns a tuple of ``(relfspath, lineno, testname)`` for this item
        where ``relfspath`` is file path relative to ``config.rootpath``
        and lineno is a 0-based line number.
        r   rà   rS   )rN  r    rh   Ú_node_location_to_relpathrr   ri   )rw   r  r)   Ú	relfspaths       r6   r  zItem.locationù  sk   € ð —?’?Ñ$Ô$ˆÝ˜H QœKÑ(Ô(ˆØ”L×:Ò:¸4Ñ@Ô@ˆ	Ý�H˜Q”KÑ Ô ¥CÐ'Ð'Ð'Ð'Ø˜8 Aœ;¨°¬Ð4Ð4r8   )NNNN)rf   rk   rh   rl   rm   rn   r-   ro   rø   )rG  ri   rH  ri   rI  ri   r-   ro   )r-   rL  )r-   rO  )r5   rC   r^   r_   ÚnextitemrK   r:  r  r  rF  rK  rN  r   r  r`   ra   s   @r6   r6  r6  �  så   ø€ € € € € ðð ð
 €Hð
 Ø $Ø"&Ø!ð=ð =ð =ð =ð =ð =ð =ð:ð ð ð ð: 	ÔðRð Rð Rñ ÔðRð?ð ?ð ?ð ?ð"#ð #ð #ð #ð ð
5ð 
5ð 
5ñ „_ð
5ð 
5ð 
5ð 
5ð 
5r8   r6  )r'   r(   r)   r*   r+   r,   r-   r
   )rµ   r:   r-   rÿ   )r  r  r)   r
   r-   rn   )KÚ
__future__r   r  Úcollections.abcr   r   r   r   Ú	functoolsr   r	   rî   Úpathlibr
   Útypingr   r   r   r   r   r   r2   ÚpluggyÚ_pytest._codeÚ_pytestr   Ú_pytest._code.coder   r   r   r   Ú_pytest.compatr   r   Ú_pytest.configr   r   Ú_pytest.config.compatr   Ú_pytest.deprecatedr   Ú_pytest.mark.structuresr   r   r   Ú_pytest.outcomesr   Ú_pytest.pathlibr    Ú_pytest.stashr!   Ú_pytest.warning_typesr"   Útyping_extensionsr#   Ú_pytest.mainr$   r,  Ú__file__rg   r  r&   r7   r9   ÚABCMetar=   ÚABCr:   r‰   r  r$  r&  r2  r4  r6  rM   r8   r6   ú<module>rk     s»  ðà "Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø $Ð $Ð $Ð $Ð $Ð $Ø $Ð $Ð $Ð $Ð $Ð $Ø $Ð $Ð $Ð $Ð $Ð $Ø *Ð *Ð *Ð *Ð *Ð *Ø %Ð %Ð %Ð %Ð %Ð %Ø Ð Ð Ð Ð Ð Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð Ø €€€à €€€à Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø +Ð +Ð +Ð +Ð +Ð +Ø (Ð (Ð (Ð (Ð (Ð (Ø -Ð -Ð -Ð -Ð -Ð -Ø &Ð &Ð &Ð &Ð &Ð &Ø $Ð $Ð $Ð $Ð $Ð $Ø !Ð !Ð !Ð !Ð !Ð !Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø -Ð -Ð -Ð -Ð -Ð -Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø (Ð (Ð (Ð (Ð (Ð (Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø !Ð !Ð !Ð !Ð !Ð !Ø (Ð (Ð (Ð (Ð (Ð (Ø Ð Ð Ð Ð Ð Ø /Ð /Ð /Ð /Ð /Ð /ð ð %Ø&Ð&Ð&Ð&Ð&Ð&ð %Ð$Ð$Ð$Ð$Ð$ð 
€à�$�wÔ'Ñ(Ô(Ô/€ð €WˆT�]„]€ðð ð ð ð* ˆG�K vÐ.Ñ.Ô.€	ð)4ð )4ð )4ð )4ð )4ˆsŒ{ñ )4ô )4ð )4ðX]5ð ]5ð ]5ð ]5ð ]5ˆ3Œ7˜hð ]5ñ ]5ô ]5ð ]5ð@9ð 9ð 9ð 9ð&,!ð ,!ð ,!ð ,!ð ,!��c”gñ ,!ô ,!ð ,!ð^ €�4ÐÑÔð
ð 
ð 
ñ Ôð
ðCRð CRð CRð CRð CR�)˜SœWñ CRô CRð CRðLð ð ð ð ˆ;˜œñ ô ð ðð ð ð ð �˜SœWñ ô ð ð$u5ð u5ð u5ð u5ð u5ˆ4�”ñ u5ô u5ð u5ð u5ð u5r8   