§
    ×Ž’jªi  ã                  ól  — 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 erd d l1m2Z2 d d!l3m4Z4 d"Z5dDd'„Z6 eej7        ¦  «        j8        Z9 ed(¦  «        Z: ed)d*¬+¦  «        Z; G d,„ d-ej<        ¦  «        Z= G d.„ d*ej>        e=¬/¦  «        Z?dEd2„Z@ G d3„ d4e?ej>        ¦  «        ZA e
d5¬6¦  «        dFd;„¦   «         ZB G d<„ d=eAej>        ¦  «        ZC G d>„ d?eCej>        ¦  «        ZD G d@„ dAeCej>        ¦  «        ZE G dB„ dCe?ej>        ¦  «        ZFdS )Gé    )Ú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)ÚMark)ÚMarkDecorator)ÚNodeKeywords)Úfail)Úabsolutepath)ÚStash)ÚPytestWarning)ÚSelf)ÚSessionú/Úpathústr | os.PathLike[str]ÚreturnÚstrc                ó\   — t          j        | ¦  «                             dt          ¦  «        S )a…  Normalize path separators to forward slashes for nodeid compatibility.

    Replaces backslashes with forward slashes. This handles both Windows native
    paths and cross-platform data (e.g., Windows paths in serialized test reports
    when running on Linux).

    :param path: A path string or PathLike object.
    :returns: String with all backslashes replaced by forward slashes.
    ú\)ÚosÚfspathÚreplaceÚSEP©r$   s    ú;C:\Projects\DSCons\.venv\Lib\site-packages\_pytest\nodes.pyÚnorm_sepr0   5   s"   € õ Œ9�T‰?Œ?×"Ò" 4­Ñ-Ô-Ð-ó    Ú_TÚ	_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)ÚformatÚ
__module__Ú__name__r   )ÚclsÚkÚkwÚmsgs       r/   Ú__call__zNodeMeta.__call__Z   sJ   € ð!÷ Š&˜œÐ8Ð8¨#¬,Ð8Ð8ˆ&Ñ
9Ô
9ð 	õ 	ˆS˜%Ð Ñ Ô Ð Ð Ð r1   r@   útype[_T]r2   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)Ú.0rA   ÚvÚsigs      €r/   ú
<dictcomp>z$NodeMeta._create.<locals>.<dictcomp>h   s+   ø€ ÐKÐKÐK¡  A°q¸C¼NÐ7JÐ7J˜˜1Ð7JÐ7JÐ7Jr1   é   )Ú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.)ÚsuperrD   Ú	TypeErrorr   ÚgetattrÚitemsÚwarning_typesrP   ÚwarningsÚwarnÚset)r@   rA   rB   Úknown_kwrP   rM   Ú	__class__s        @€r/   Ú_createzNodeMeta._createc   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   )r@   rE   r&   r2   )r?   r>   Ú__qualname__Ú__doc__rD   r[   Ú__classcell__©rZ   s   @r/   r7   r7   K   s[   ø€ € € € € ðð ð!ð !ð !ð !ð4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4r1   r7   c                  óR  — e Zd ZU dZded<   dZ	 	 	 	 	 	 dKdLd„ZedMd„¦   «         Ze	dNd„¦   «         Z
dOd„ZdPd„Ze	dOd„¦   «         ZdQd„ZdRd „ZdRd!„ZdSd#„ZdTd%„ZdUdVd+„ZdWdXd-„Z	 dWdYd/„ZedZd1„¦   «         Zed[d4„¦   «         ZdWd\d5„Zd]d7„Zd^d9„Zd_d<„Zd`d@„ZdadD„Z	 dWdbdH„Z	 dWdcdJ„ZdS )dr4   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Úconfigr;   Úparentr$   ÚsessionNr;   r'   re   úNode | Nonerd   úConfig | Nonerf   úSession | NoneÚNoner$   úPath | NoneÚnodeidú
str | Noner&   c                ó  — || _         || _        |r|| _        n|st          d¦  «        ‚|j        | _        |r|| _        n|st          d¦  «        ‚|j        | _        |€|€J ‚|j        }|| _        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 providedz::()z!nodeid or parent must be providedz::)r;   re   rd   rR   rf   r$   r   ÚkeywordsÚown_markersrX   Úextra_keyword_matchesrb   rl   r   Ústashrc   )Úselfr;   re   rd   rf   r+   r$   rl   s           r/   rG   zNode.__init__“   s,  € ð ˆŒ	ð ˆŒàð 	(à"(ˆDŒKˆKàð EÝÐ CÑDÔDÐDØ œ-ˆDŒKàð 	*à$+ˆDŒLˆLàð FÝÐ DÑEÔEÐEØ!œ>ˆDŒLàˆ<ØÐ%Ð%Ð%Ø”;ˆDà"&ˆŒ	õ 3?¸tÑ2DÔ2DˆŒð (*ˆÔõ 03©u¬uˆÔ"àÐØ Ð'Ð'Ð'Ð'Ø!ˆDŒLˆLà”;ð EÝÐ CÑDÔDÐDØœ;Ô-°Ñ4°t´yÑ@ˆDŒLõ "™GœGˆŒ
à”jˆŒˆˆr1   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.
        rd   z.config is not a valid argument for from_parentrf   z/session is not a valid argument for from_parentre   rI   )rR   r[   )r@   re   rB   s      r/   Úfrom_parentzNode.from_parentÑ   sQ   € ð �rˆ>ˆ>ÝÐLÑMÔMÐMØ˜ˆ?ˆ?ÝÐMÑNÔNÐNØˆsŒ{Ð/Ð/ &Ð/¨BÐ/Ð/Ð/r1   úpluggy.HookRelayc                ó@   — | j                              | j        ¦  «        S )z4Path-sensitive hook proxy used to call pytest hooks.)rf   Úgethookproxyr$   ©rs   s    r/   Úihookz
Node.ihookã   s   € ð Œ|×(Ò(¨¬Ñ3Ô3Ð3r1   c                ó`   — d                      | j        j        t          | dd ¦  «        ¦  «        S )Nz<{} {}>r;   )r=   rZ   r?   rS   ry   s    r/   Ú__repr__zNode.__repr__è   s)   € Ø×Ò ¤Ô 7½ÀÀvÈtÑ9TÔ9TÑUÔUÐUr1   Ú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 NrO   )ÚcategoryÚfilenameÚlineno)Ú
isinstancer~   Ú
ValueErrorÚget_fslocation_from_itemrV   Úwarn_explicitr'   )rs   r}   r$   r‚   s       r/   rW   z	Node.warnë   sŒ   € õ, ˜'¥7Ñ+Ô+ð 	ÝØVÈ7ÐVÐVñô ð õ 0°Ñ5Ô5‰ˆˆfØÐ!Ð!Ð!ÝÔØØÝ˜‘Y”YØ˜A‘:ð		
ñ 	
ô 	
ð 	
ð 	
ð 	
r1   c                ó   — | j         S )z;A ::-separated string denoting its collection tree address.)rb   ry   s    r/   rl   zNode.nodeid  s   € ð Œ|Ðr1   Úintc                ó*   — t          | j        ¦  «        S ©N)Úhashrb   ry   s    r/   Ú__hash__zNode.__hash__  s   € Ý�D”LÑ!Ô!Ð!r1   c                ó   — d S rŠ   rI   ry   s    r/   Úsetupz
Node.setup  ó   € Øˆr1   c                ó   — d S rŠ   rI   ry   s    r/   ÚteardownzNode.teardown  r�   r1   ú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)re   )rs   re   s     r/   Úiter_parentszNode.iter_parents  s7   è è € ð #ˆØÐ ØˆLˆLˆLØ”]ˆFð Ð Ð Ð Ð Ð r1   ú
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.)Úappendre   Úreverse)rs   ÚchainÚitems      r/   Ú	listchainzNode.listchain)  sI   € ð ˆØ ˆØÐØ�LŠL˜ÑÔÐØ”;ˆDð Ðð 	�Š‰ŒˆØˆr1   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   r'   rS   r„   ro   r;   rp   r—   ÚmarkÚinsert)rs   rœ   r—   r    Úmarker_s        r/   Ú
add_markerzNode.add_marker4  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Ð4r1   ú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 )rO   NrI   ©rK   Úxs     r/   ú	<genexpr>z$Node.iter_markers.<locals>.<genexpr>P  s&   è è € ÐEÐE˜��!”ÐEÐEÐEÐEÐEÐEr1   r:   )Úiter_markers_with_node©rs   r;   s     r/   Úiter_markerszNode.iter_markersJ  s*   € ð FÐE˜d×9Ò9¸tÐ9ÑDÔDÐEÑEÔEÐEr1   ú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.
        Nr;   )r”   rp   rS   )rs   r;   Únoder¢   s       r/   r¬   zNode.iter_markers_with_nodeR  sp   è è € ð ×%Ò%Ñ'Ô'ð 	%ð 	%ˆDØÔ(ð %ð %�Ø�<¥7¨4°¸Ñ#>Ô#>À$Ò#FÐ#FØ ˜*Ð$Ð$Ð$øð%ð	%ð 	%r1   úMark | Nonec                ó   — d S rŠ   rI   r­   s     r/   Úget_closest_markerzNode.get_closest_marker_  s   € Ø<?¸Cr1   Údefaultr   c                ó   — d S rŠ   rI   ©rs   r;   rµ   s      r/   r´   zNode.get_closest_markerb  s   € ØDGÀCr1   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      r/   r´   zNode.get_closest_markere  s%   € õ �D×%Ò%¨4Ð%Ñ0Ô0°'Ñ:Ô:Ð:r1   úset[str]c                ó„   — t          ¦   «         }|                      ¦   «         D ]}|                     |j        ¦  «         Œ|S )z;Return a set of all extra keywords in self and any parents.)rX   r›   Úupdaterq   )rs   Úextra_keywordsrš   s      r/   ÚlistextrakeywordszNode.listextrakeywordsn  sD   € å#&¡5¤5ˆØ—N’NÑ$Ô$ð 	>ð 	>ˆDØ×!Ò! $Ô"<Ñ=Ô=Ð=Ð=ØÐr1   ú	list[str]c                ó>   — d„ |                       ¦   «         D ¦   «         S )Nc                ó   — g | ]	}|j         ‘Œ
S rI   r:   r©   s     r/   ú
<listcomp>z"Node.listnames.<locals>.<listcomp>v  s   € Ð1Ð1Ð1˜1�”Ð1Ð1Ð1r1   )r›   ry   s    r/   Ú	listnameszNode.listnamesu  s    € Ø1Ð1 §¢Ñ 0Ô 0Ð1Ñ1Ô1Ð1r1   Ú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)rf   Ú_setupstateÚaddfinalizer)rs   rÄ   s     r/   rÈ   zNode.addfinalizerx  s%   € ð 	ŒÔ ×-Ò-¨c°4Ñ8Ô8Ð8Ð8Ð8r1   r@   ú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ƒ   )rs   r@   r±   s      r/   Ú	getparentzNode.getparent�  sD   € ð ×%Ò%Ñ'Ô'ð 	ð 	ˆDÝ˜$ Ñ$Ô$ð Ø���ðàˆtr1   ÚexcinfoúExceptionInfo[BaseException]r   c                ó   — |j         S rŠ   )Ú	traceback)rs   rÍ   s     r/   Ú_traceback_filterzNode._traceback_filter�  s   € ØÔ Ð r1   Ú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ÚshortrO   Té   Ú
showlocals)ÚfuncargsÚabspathrÝ   rÒ   ÚtbfilterÚtruncate_localsÚtruncate_args)Ú_pytest.fixturesrÕ   rƒ   rÖ   r   r   Úfrom_exceptionÚcauser   Ú	Exceptionr<   Ú
formatreprrd   Ú	getoptionrÑ   Úget_verbosityr
   r*   ÚgetcwdÚinvocation_paramsÚdirÚOSErrorÚgetrepr)rs   rÍ   rÒ   rÕ   rà   rá   râ   rß   s           r/   Ú_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ï   )rs   rÍ   rÒ   s      r/   Úrepr_failurezNode.repr_failureÊ  s   € ð ×$Ò$ W¨eÑ4Ô4Ð4r1   )NNNNNN)r;   r'   re   rg   rd   rh   rf   ri   r+   rj   r$   rk   rl   rm   r&   rj   )re   r4   r&   r!   )r&   rv   )r&   r'   )r}   r~   r&   rj   )r&   rˆ   ©r&   rj   )r&   r’   )r&   r•   )T)rœ   r�   r—   rž   r&   rj   rŠ   )r;   rm   r&   r¦   )r;   rm   r&   r¯   )r;   r'   r&   r²   )r;   r'   rµ   r   r&   r   )r;   r'   rµ   r²   r&   r²   )r&   rº   )r&   r¿   )rÄ   rÅ   r&   rj   )r@   rÉ   r&   rÊ   ©rÍ   rÎ   r&   r   )rÍ   rÎ   rÒ   rÓ   r&   r   )rÍ   rÎ   rÒ   rÓ   r&   rð   )r?   r>   r\   r]   Ú__annotations__Ú	__slots__rG   Úclassmethodru   Úpropertyrz   r|   rW   rl   rŒ   rŽ   r‘   r”   r›   r¥   r®   r¬   r   r´   r¾   rÃ   rÈ   rÌ   rÑ   rï   rò   rI   r1   r/   r4   r4   w   s‘  € € € € € € ðð ð ÐÐÑð	€Ið #Ø $Ø"&ØØ Ø!ð<!ð <!ð <!ð <!ð <!ð| ð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ð 5r1   )Ú	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éÿÿÿÿ)rS   r   )r±   rü   rý   s      r/   r…   r…   Ø  se   € õ 4;¸4ÀÈTÑ3RÔ3R€HØÐØ˜˜˜Œ|ÐÝ
�$˜˜tÑ
$Ô
$€CØ
€Ý˜3ÑÔÐÝ�4˜Ð!3Ñ4Ô4°bÐ8Ð8r1   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©r?   r>   r\   r]   rI   r1   r/   ÚCollectErrorr  ò  s   € € € € € ØDÐDÐDÐDr1   r  r&   úIterable[Item | Collector]c                ó    — t          d¦  «        ‚)z;Collect children (items and collectors) for this collector.Úabstract©ÚNotImplementedErrorry   s    r/   ÚcollectzCollector.collectõ  s   € õ " *Ñ-Ô-Ð-r1   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  rd   rè   r'   Úargsrï   )rs   rÍ   ÚexcrÚ   s       r/   rò   zCollector.repr_failureû  sš   € õ �g”m TÔ%6Ñ7Ô7ð 	$ÀÄ×@UÒ@UØ˜ñA
ô A
ð 	$ð ”-ˆCÝ�s”x ”{Ñ#Ô#Ð#ð ”+×'Ò'¨	°6Ñ:Ô:ˆØ�fÒÐØˆGà×$Ò$ W°GÐ$Ñ<Ô<Ð<r1   r   c                óà   — t          | d¦  «        rX|j        }|                     | j        ¬¦  «        }||k    r|                     t          ¬¦  «        }|                     |¦  «        S |j        S )Nr$   r.   )Úexcludepath)ÚhasattrrÐ   Úcutr$   ÚtracebackcutdirÚfilter)rs   rÍ   rÐ   Ú
ntracebacks       r/   rÑ   zCollector._traceback_filter  sl   € Ý�4˜Ñ Ô ð 	.ØÔ)ˆIØ"Ÿš¨D¬I˜Ñ6Ô6ˆJØ˜YÒ&Ð&Ø'Ÿ^š^½˜^ÑHÔH�
Ø×$Ò$ WÑ-Ô-Ð-ØÔ Ð r1   N)r&   r  )rÍ   rÎ   r&   rð   rô   )r?   r>   r\   r]   ræ   r  ÚabcÚabstractmethodr
  rò   rÑ   rI   r1   r/   r   r   ë  sœ   € € € € € ðð ðEð Eð Eð Eð E�yñ Eô Eð Eð 	Ôð.ð .ð .ñ Ôð.ð
=ð =ð =ð =ð*!ð !ð !ð !ð !ð !r1   r   iè  )ÚmaxsizeÚinitial_pathsúfrozenset[Path]r
   rm   c                óv   — || v rdS |j         D ]*}|| v r$t          |                     |¦  «        ¦  «        c S Œ+d S )NÚ )Úparentsr'   Úrelative_to)r  r$   re   s      r/   Ú_check_initialpaths_for_relpathr    s^   € ð ˆ}ÐÐØˆrà”,ð 1ð 1ˆØ�]Ð"Ð"Ý�t×'Ò'¨Ñ/Ô/Ñ0Ô0Ð0Ð0Ð0ð #ð ˆ4r1   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+   rj   Úpath_or_parentúPath | Node | Noner$   rk   r;   rm   re   rg   rd   rh   rf   ri   rl   r&   c	                ó´  •— |rJt          |t          ¦  «        r|�J ‚t          t          |¦  «        }nt          |t          ¦  «        r|�J ‚|}|€J ‚|€^|j        }|�U|j        |k    rJ	 |                     |j        ¦  «        }	t          |	¦  «        }n# t          $ r Y nw xY wt          |¦  «        }|| _        |€|€J ‚|j        }|€i	 t          | j                             |j        j        ¦  «        ¦  «        }n%# t          $ r t          |j        |¦  «        }Y nw xY w|rt          |¦  «        }t!          ¦   «                              ||||||¬¦  «         d S )N)r;   re   rd   rf   rl   r$   )rƒ   r4   r   r   r
   r;   r$   r  r'   r„   r0   rf   rd   Úrootpathr  Ú_initialpathsrQ   rG   )rs   r+   r!  r$   r;   re   rd   rf   rl   ÚrelrZ   s             €r/   rG   zFSCollector.__init__+  s³  ø€ ð ð 	&Ý˜.­$Ñ/Ô/ð &Ø�~�~�~Ý�k¨>Ñ:Ô:��Ý˜N­DÑ1Ô1ð &Ø�|�|�|Ø%�ØÐÐÐàˆ<Ø”9ˆDØÐ! f¤k°TÒ&9Ð&9ð$Ø×*Ò*¨6¬;Ñ7Ô7�Cõ ˜s™8œ8�D�Døõ "ð ð ð Ø�Dðøøøõ   ‘~”~�ØˆŒ	àˆ?ØÐ%Ð%Ð%Ø”nˆGàˆ>ðVÝ˜TœY×2Ò2°7´>Ô3JÑKÔKÑLÔL��øÝð Vð Vð VÝ8¸Ô9NÐPTÑUÔU���ðVøøøð ð *Ý! &Ñ)Ô)�å‰Œ×ÒØØØØØØð 	ñ 	
ô 	
ð 	
ð 	
ð 	
s$   Á)B Â
B ÂB Ã	1C; Ã;DÄD)r+   r$   r!   c               ó>   •—  t          ¦   «         j        d|||dœ|¤ŽS )zThe public constructor.)re   r+   r$   rI   )rQ   ru   )r@   re   r+   r$   rB   rZ   s        €r/   ru   zFSCollector.from_parenta  s+   ø€ ð #�u‰wŒwÔ"ÐQ¨&¸ÀdÐQÐQÈbÐQÐQÐQr1   )NNNNNNNN)r+   rj   r!  r"  r$   rk   r;   rm   re   rg   rd   rh   rf   ri   rl   rm   r&   rj   )r+   rj   r$   rk   r&   r!   )r?   r>   r\   r]   rG   r÷   ru   r^   r_   s   @r/   r   r   (  s«   ø€ € € € € Ø/Ð/ð Ø-1Ø ØØ"Ø $Ø"&Ø!ð4
ð 4
ð 4
ð 4
ð 4
ð 4
ð 4
ðl ð
 Ø ð	Rð 	Rð 	Rð 	Rð 	Rð 	Rð 	Rñ „[ð	Rð 	Rð 	Rð 	Rð 	Rr1   r   c                  ó   — e Zd ZdZdS )ÚFilezOBase class for collecting tests from a file.

    :ref:`non-python tests`.
    Nr  rI   r1   r/   r)  r)  n  s   € € € € € ðð ð ð r1   r)  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  rI   r1   r/   r+  r+  u  s   € € € € € ðð ð ð r1   r+  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.
    Nrd   rh   rf   ri   rl   rm   r&   rj   c                óŠ   •—  t          ¦   «         j        ||f|||dœ|¤Ž g | _        g | _        |                      ¦   «          d S )N)rd   rf   rl   )rQ   rG   Ú_report_sectionsÚuser_propertiesÚ-_check_item_and_collector_diamond_inheritance)rs   r;   re   rd   rf   rl   rB   rZ   s          €r/   rG   zItem.__init__�  sq   ø€ ð 	�‰ŒÔØØð	
ð ØØð	
ð 	
ð ð	
ð 	
ð 	
ð =?ˆÔð :<ˆÔà×:Ò:Ñ<Ô<Ð<Ð<Ð<r1   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   r?   )rK   Úbases     r/   r«   zEItem._check_item_and_collector_diamond_inheritance.<locals>.<genexpr>¼  sG   è è € ð 
ð 
Ø"µzÀ$Í	Ñ7RÔ7Rð
ØŒMð
ð 
ð 
ð 
ð 
ð 
r1   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/)	ÚtyperS   ÚsetattrÚjoinÚ	__bases__rV   rW   r?   r    )rs   r@   Ú	attr_nameÚproblemss       r/   r1  z2Item._check_item_and_collector_diamond_inheritance¬  sÐ   € õ
 �4‰jŒjˆð @ˆ	Ý�3˜	 5Ñ)Ô)ð 	ØˆFÝ��Y Ñ%Ô%Ð%à—9’9ð 
ð 
Ø&)¤mð
ñ 
ô 
ñ 
ô 
ˆð ð 	ÝŒMØ”<ð gð gØ%-ðgð gð gõ
 ñô ð ð ð ð	ð 	r1   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  ry   s    r/   ÚruntestzItem.runtestÉ  s   € õ "Ð"PÑQÔQÐQr1   Úwhenr'   Ú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)r/  r—   )rs   r?  r@  rA  s       r/   Úadd_report_sectionzItem.add_report_sectionÓ  s:   € ð ð 	?ØÔ!×(Ò(¨$°°WÐ)=Ñ>Ô>Ð>Ð>Ð>ð	?ð 	?r1   ú.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.   ry   s    r/   Ú
reportinfozItem.reportinfoä  s   € ð Œy˜$ Ð"Ð"r1   ú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Ü   rO   )rF  r   rf   Ú_node_location_to_relpathr7  r'   )rs   rü   r$   Ú	relfspaths       r/   rü   zItem.locationñ  sk   € ð —?’?Ñ$Ô$ˆÝ˜H QœKÑ(Ô(ˆØ”L×:Ò:¸4Ñ@Ô@ˆ	Ý�H˜Q”KÑ Ô ¥CÐ'Ð'Ð'Ð'Ø˜8 Aœ;¨°¬Ð4Ð4r1   )NNNN)rd   rh   rf   ri   rl   rm   r&   rj   ró   )r?  r'   r@  r'   rA  r'   r&   rj   )r&   rD  )r&   rG  )r?   r>   r\   r]   ÚnextitemrG   r1  r  r  r>  rC  rF  r   rü   r^   r_   s   @r/   r-  r-  ‡  så   ø€ € € € € ðð ð
 €Hð
 Ø $Ø"&Ø!ð=ð =ð =ð =ð =ð =ð =ð:ð ð ð ð: 	ÔðRð Rð Rñ ÔðRð?ð ?ð ?ð ?ð"#ð #ð #ð #ð ð
5ð 
5ð 
5ñ „_ð
5ð 
5ð 
5ð 
5ð 
5r1   r-  )r$   r%   r&   r'   )r±   r4   r&   rú   )r  r  r$   r
   r&   rm   )GÚ
__future__r   r  Úcollections.abcr   r   r   r   Ú	functoolsr   r	   r*   Úpathlibr
   Útypingr   r   r   r   r   r   rV   ÚpluggyÚ_pytest._codeÚ_pytestr   Ú_pytest._code.coder   r   r   r   Ú_pytest.compatr   r   Ú_pytest.configr   r   Ú_pytest.mark.structuresr   r   r   Ú_pytest.outcomesr   Ú_pytest.pathlibr   Ú_pytest.stashr   Ú_pytest.warning_typesr    Útyping_extensionsr!   Ú_pytest.mainr"   r-   r0   Ú__file__re   r  r2   r3   ÚABCMetar7   ÚABCr4   r…   r   r  r   r)  r+  r-  rI   r1   r/   ú<module>ra     s™  ðà "Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø $Ð $Ð $Ð $Ð $Ð $Ø $Ð $Ð $Ð $Ð $Ð $Ø $Ð $Ð $Ð $Ð $Ð $Ø *Ð *Ð *Ð *Ð *Ð *Ø %Ð %Ð %Ð %Ð %Ð %Ø Ð Ð Ð Ð Ð Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð Ø €€€à €€€à Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø +Ð +Ð +Ð +Ð +Ð +Ø (Ð (Ð (Ð (Ð (Ð (Ø -Ð -Ð -Ð -Ð -Ð -Ø &Ð &Ð &Ð &Ð &Ð &Ø $Ð $Ð $Ð $Ð $Ð $Ø !Ð !Ð !Ð !Ð !Ð !Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø (Ð (Ð (Ð (Ð (Ð (Ø 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ðB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5r1   