Ë
    •Kêj\m  ã                  ó   — 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.m/Z/ d d l0m1Z1 d d!l2m3Z3 erd d"l4m5Z5 d d#l6m7Z7 d$Z8d<d%„Z9 eejt                  «      jv                  Z< ed&«      Z= ed'd(¬)«      Z> G d*„ d+ej~                  «      Z@ G d,„ d(ej‚                  e@¬-«      ZBd=d.„ZC G d/„ d0eBej‚                  «      ZD e
d1¬2«      	 	 	 	 	 	 d>d3„«       ZE G d4„ d5eDej‚                  «      ZF G d6„ d7eFej‚                  «      ZG G d8„ d9eFej‚                  «      ZH G d:„ d;eBej‚                  «      ZIy)?é    )Ú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)Úcoerce_node_id)ÚNodeId)Úfail)Úabsolutepath)ÚStash)ÚPytestWarning)ÚSelf)ÚSessionú/c                óT   — t        j                  | «      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©Úpaths    úR/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/_pytest/nodes.pyÚnorm_sepr/   7   s   € ô �9‰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.
    c                ót   — dj                  | j                  › d| j                  › �¬«      }t        |d¬«       y )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__\   s:   € ð!÷ ‰&˜Ÿ™Ð(¨¨#¯,©,¨Ð8ˆ&Ó
9ð 	ô 	ˆS˜%Ö r0   c           
     ó\  •— 	 t        ‰| �  |i |¤ŽS # t        $ r� t        t	        | d«      «      }|j                  «       D ��ci c]  \  }}||j                  v sŒ||“Œ nc c}}w }}}ddlm} t        j                   || › dt        |«      › d�«      «       t        ‰| �  i |¤ŽcY S w xY w)NÚ__init__é   )Ú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.)ÚsuperrC   Ú	TypeErrorr   ÚgetattrÚitemsÚ
parametersÚwarning_typesrG   ÚwarningsÚwarnÚset)r?   r@   rA   ÚsigÚvÚknown_kwrG   Ú	__class__s          €r.   Ú_createzNodeMeta._createe   s¹   ø€ ð	4Ü‘7Ñ# QÐ-¨"Ñ-Ð-øÜò 	4ÜœG C¨Ó4Ó5ˆCØ)+¯©«×K¡  A°q¸C¿N¹NÒ7J˜˜1™ÑKùÓKˆHÑKÝ?ä�M‰MÙ(Ø�eÐRÔSVÐW_ÓS`ÐRað b(ð (óôô ‘7Ñ# QÐ3¨(Ñ3Ò3ð	4ús"   ƒ ’1B+ÁA ÁA ÁA	B+Â*B+)Úreturnr   )r?   ztype[_T]rV   r1   )r>   r=   Ú__qualname__Ú__doc__rC   rU   Ú__classcell__©rT   s   @r.   r6   r6   M   s   ø„ ñó!÷4ñ 4r0   r6   c                  ó€  — e Zd ZU dZded<   dZ	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zed d„«       Ze	d!d„«       Z
d"d	„Zd#d
„Ze	d"d„«       Ze	d$d„«       Zd%d„Zd%d„Zd&d„Zd'd„Zd(d)d„Zd*d+d„Z	 d*	 	 	 d,d„Zed-d„«       Zed.d„«       Z	 d*	 	 	 	 	 d/d„Zd0d„Zd1d„Zd2d„Zd3d„Zd4d„Z	 d*	 	 	 	 	 d5d„Z	 d*	 	 	 	 	 d6d„Zy)7r3   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__Ú_idÚ_storeÚconfigr:   Úparentr-   ÚsessionNc                óŠ  — || _         || _        |r|| _        n|st        d«      ‚|j                  | _        |r|| _        n|st        d«      ‚|j                  | _        |€|€J ‚|j
                  }|| _        t        | «      | _        g | _        t        «       | _
        |�9t        |t        t        f«      st        d|›d|› d�«      ‚t        |«      | _        nK| j                  st        d«      ‚| j                  j"                  j%                  | j                   «      | _        t'        «       | _        | j(                  | _        y )Nz!config or parent must be providedz"session or parent must be providedz+nodeid must be a NodeId, str, or None, got z (name=zc). Do not pass nodeid explicitly -- use Node.from_parent() and let pytest compute it automatically.z!nodeid or parent must be provided)r:   r`   r_   rI   ra   r-   r   ÚkeywordsÚown_markersrP   Úextra_keyword_matchesÚ
isinstancer   ÚstrÚ
ValueErrorr   r]   ÚidÚchildr!   Ústashr^   )Úselfr:   r`   r_   ra   r)   r-   Únodeids           r.   rE   zNode.__init__•   s3  € ð ˆŒ	ð ˆŒáà"(ˆD�KáÜÐ CÓDÐDØ Ÿ-™-ˆDŒKáà$+ˆD�LáÜÐ DÓEÐEØ!Ÿ>™>ˆDŒLàˆ<ØÐ%Ð%Ð%Ø—;‘;ˆDà"&ˆŒ	ô 3?¸tÓ2DˆŒð (*ˆÔô 03«uˆÔ"àÐÜ˜f¤v¬s mÔ4Ü ð$Ø$* :¨W°T°Fð ;RðSóð ô & fÓ-ˆD�Hà—;’;ÜÐ CÓDÐDØ—{‘{—~‘~×+Ñ+¨D¯I©IÓ6ˆDŒHô "›GˆŒ
à—j‘jˆ�r0   c                óf   — 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.
        r_   z.config is not a valid argument for from_parentra   z/session is not a valid argument for from_parentr`   © )rI   rU   )r?   r`   rA   s      r.   Úfrom_parentzNode.from_parentâ   sC   € ð �r‰>ÜÐLÓMÐMØ˜‰?ÜÐMÓNÐNØˆs�{‰{Ñ/ &Ð/¨BÑ/Ð/r0   c                óL   — | j                   j                  | j                  «      S )z4Path-sensitive hook proxy used to call pytest hooks.)ra   Úgethookproxyr-   ©rl   s    r.   Úihookz
Node.ihookô   s   € ð �|‰|×(Ñ(¨¯©Ó3Ð3r0   c                ód   — dj                  | j                  j                  t        | dd «      «      S )Nz<{} {}>r:   )r<   rT   r>   rJ   rs   s    r.   Ú__repr__zNode.__repr__ù   s(   € Ø×Ñ §¡× 7Ñ 7¼ÀÀvÈtÓ9TÓUÐUr0   c                ó®   — t        |t        «      st        d|›�«      ‚t        | «      \  }}|€J ‚t	        j
                  |dt        |«      |dz   ¬«       y)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 NrF   )ÚcategoryÚfilenameÚlineno)rf   ÚWarningrh   Úget_fslocation_from_itemrN   Úwarn_explicitrg   )rl   Úwarningr-   rz   s       r.   rO   z	Node.warnü   sc   € ô, ˜'¤7Ô+ÜØJÈ7È+ÐVóð ô 0°Ó5‰ˆˆfØÐ!Ð!Ð!Ü×ÑØØÜ˜“YØ˜A‘:ö		
r0   c                ó,   — t        | j                  «      S )z;A ::-separated string denoting its collection tree address.)rg   r]   rs   s    r.   rm   zNode.nodeid!  s   € ô �4—8‘8‹}Ðr0   c                ó   — | j                   S )zTThe structured (non-string) form of :attr:`nodeid`.

        :meta private:
        )r]   rs   s    r.   ri   zNode.id&  s   € ð �x‰xˆr0   c                 ó   — y ©Nro   rs   s    r.   Úsetupz
Node.setup.  ó   € Ør0   c                 ó   — y r‚   ro   rs   s    r.   ÚteardownzNode.teardown1  r„   r0   c              #  ó<   K  — | }|�|–— |j                   }|�Œyy­w)zšIterate over all parent collectors starting from and including self
        up to the root of the collection tree.

        .. versionadded:: 8.1
        N)r`   )rl   r`   s     r.   Úiter_parentszNode.iter_parents4  s)   è ø€ ð #ˆØÐ ØŠLØ—]‘]ˆFð Ó ùs   ‚šc                ór   — g }| }|� |j                  |«       |j                  }|�Œ |j                  «        |S )zxReturn a list of all parent collectors starting from the root of the
        collection tree down to and including self.)Úappendr`   Úreverse)rl   ÚchainÚitems      r.   Ú	listchainzNode.listchain?  sA   € ð ˆØ ˆØÐØ�L‰L˜ÔØ—;‘;ˆDð Ñð 	�‰ŒØˆr0   c                óh  — ddl m} t        |t        «      r|}n(t        |t        «      rt        ||«      }nt        d«      ‚|j                  | j                  |j                  <   |r&| j                  j                  |j                  «       y| j                  j                  d|j                  «       y)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�   rf   r   rg   rJ   rh   Úmarkrc   r:   rd   rŠ   Úinsert)rl   ÚmarkerrŠ   r�   Úmarker_s        r.   Ú
add_markerzNode.add_markerJ  sƒ   € õ 	*ä�fœmÔ,Ø‰GÜ˜¤Ô$Ü˜h¨Ó/‰GäÐFÓGÐGØ&-§l¡lˆ�‰�g—l‘lÑ#ÙØ×Ñ×#Ñ# G§L¡LÕ1à×Ñ×#Ñ# A w§|¡|Õ4r0   c                ó4   — d„ | j                  |¬«      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    –— Œ y­w)rF   Nro   )Ú.0Úxs     r.   ú	<genexpr>z$Node.iter_markers.<locals>.<genexpr>f  s   è ø€ ÒE˜��!•ÑEùs   ‚r9   )Úiter_markers_with_node©rl   r:   s     r.   Úiter_markerszNode.iter_markers`  s   € ñ F˜d×9Ñ9¸tÐ9ÓDÔEÐEr0   c              #  óŠ   K  — | j                  «       D ],  }|j                  D ]  }|�t        |dd«      |k(  sŒ||f–— Œ Œ. y­w)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ˆ   rd   rJ   )rl   r:   Únoder’   s       r.   rœ   zNode.iter_markers_with_nodeh  sT   è ø€ ð ×%Ñ%Ó'ò 	%ˆDØ×(Ñ(ò %�Ø�<¤7¨4°¸Ó#>À$Ó#FØ ˜*Ó$ñ%ñ	%ùs
   ‚5A¸Ac                 ó   — y r‚   ro   r�   s     r.   Úget_closest_markerzNode.get_closest_markeru  s   € Ø<?r0   c                 ó   — y r‚   ro   ©rl   r:   Údefaults      r.   r¢   zNode.get_closest_markerx  s   € ØTWr0   c                ór   — t        |t        «      r|j                  }t        | j	                  |¬«      |«      S )a¦  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. A
            :class:`~pytest.MarkDecorator` such as ``pytest.mark.foo(1)`` is
            also accepted, in which case its :class:`~pytest.Mark` is returned.
        :param name: Name to filter by.
        r9   )rf   r   r’   Únextrž   r¤   s      r.   r¢   zNode.get_closest_marker{  s2   € ô �gœ}Ô-Ø—l‘lˆGÜ�D×%Ñ%¨4Ð%Ó0°'Ó:Ð:r0   c                óz   — t        «       }| j                  «       D ]  }|j                  |j                  «       Œ |S )z;Return a set of all extra keywords in self and any parents.)rP   rŽ   Úupdatere   )rl   Úextra_keywordsr�   s      r.   ÚlistextrakeywordszNode.listextrakeywords‹  s9   € ä#&£5ˆØ—N‘NÓ$ò 	>ˆDØ×!Ñ! $×"<Ñ"<Õ=ð	>àÐr0   c                ó\   — | j                  «       D �cg c]  }|j                  ‘Œ c}S c c}w r‚   )rŽ   r:   )rl   rš   s     r.   Ú	listnameszNode.listnames’  s!   € Ø $§¡Ó 0Ö1˜1�—“Ò1Ð1ùÒ1s   “)c                óP   — | j                   j                  j                  || «       y)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)ra   Ú_setupstateÚaddfinalizer)rl   Úfins     r.   r°   zNode.addfinalizer•  s   € ð 	�‰× Ñ ×-Ñ-¨c°4Õ8r0   c                óN   — | j                  «       D ]  }t        ||«      sŒ|c S  y)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ˆ   rf   )rl   r?   r    s      r.   Ú	getparentzNode.getparentž  s0   € ð ×%Ñ%Ó'ò 	ˆDÜ˜$ Õ$Ø’ð	ð r0   c                ó   — |j                   S r‚   )Ú	traceback)rl   Úexcinfos     r.   Ú_traceback_filterzNode._traceback_filterª  s   € Ø× Ñ Ð r0   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                  j                  «       S | j                  j                  dd«      rd}d}n| j                  }|dk(  rd}|€$| j                  j                  dd«      d	k(  rd	}nd}| j                  j                  «       d
kD  rd}nd}| j                  j                  «       dkD  rdnd}	 t!        t#        j$                  «       «      | j                  j&                  j(                  k7  }|j-                  d|| j                  j                  dd«      ||||¬«      S # t*        $ r d}Y Œ?w xY w)Nr   )ÚFixtureLookupErrorÚvalueÚ	fulltraceFÚlongÚautoÚtbstyleÚshortrF   Té   Ú
showlocals)ÚfuncargsÚabspathrÁ   ÚstyleÚtbfilterÚtruncate_localsÚtruncate_args)Ú_pytest.fixturesr¹   rf   rº   r   r   Úfrom_exceptionÚcauser   Ú	Exceptionr;   Ú
formatreprr_   Ú	getoptionr·   Úget_verbosityr
   r(   ÚgetcwdÚinvocation_paramsÚdirÚOSErrorÚgetrepr)rl   r¶   rÄ   r¹   rÅ   rÆ   rÇ   rÃ   s           r.   Ú_repr_failure_pyzNode._repr_failure_py­  s�  € õ
 	8ä�g—m‘mÔ%:Ô;Ü#×2Ñ2°7·=±=×3FÑ3FÓGˆGÜ�g—m‘m¤T§^¡^Ô4Ø—=‘=×(Ò(Ø�Ü�g—m‘mÐ%7Ô8Ø—=‘=×+Ñ+Ó-Ð-ð �;‰;× Ñ  ¨eÔ4ØˆEØ‰Hà×-Ñ-ˆHØ˜ŠØ�àˆ=Ø�{‰{×$Ñ$ Y°Ó7¸7ÒBØ‘à�à�;‰;×$Ñ$Ó&¨Ò*Ø#‰Oà"ˆOà!%§¡×!:Ñ!:Ó!<¸qÒ!@™Àdˆð	Üœ2Ÿ9™9›;Ó'¨4¯;©;×+HÑ+H×+LÑ+LÑLˆGð �‰ØØØ—{‘{×,Ñ,¨\¸5ÓAØØØ+Ø'ð ó 
ð 	
øô ò 	ØŠGð	ús   Å>G ÇGÇGc                ó&   — | j                  ||«      S )z¯Return a representation of a collection or test failure.

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

        :param excinfo: Exception information for the failure.
        )rÔ   )rl   r¶   rÄ   s      r.   Úrepr_failurezNode.repr_failureç  s   € ð ×$Ñ$ W¨eÓ4Ð4r0   )NNNNNN)r:   rg   r`   úCollector | Noner_   úConfig | Nonera   úSession | Noner)   ÚNoner-   úPath | Nonerm   úNodeId | str | NonerV   rÚ   )r`   Ú	CollectorrV   r#   )rV   zpluggy.HookRelay)rV   rg   )r~   r{   rV   rÚ   )rV   r   ©rV   rÚ   )rV   zIterator[Node])rV   z
list[Node])T)r”   zstr | MarkDecoratorrŠ   ÚboolrV   rÚ   r‚   )r:   ú
str | NonerV   zIterator[Mark])r:   rà   rV   zIterator[tuple[Node, Mark]])r:   rg   rV   úMark | None)r:   rg   r¥   zMark | MarkDecoratorrV   r   )r:   rg   r¥   zMark | MarkDecorator | NonerV   rá   )rV   zset[str])rV   z	list[str])r±   zCallable[[], object]rV   rÚ   )r?   ztype[_NodeType]rV   z_NodeType | None©r¶   úExceptionInfo[BaseException]rV   r   )r¶   rã   rÄ   úTracebackStyle | NonerV   r   )r¶   rã   rÄ   rä   rV   ústr | TerminalRepr)r>   r=   rW   rX   Ú__annotations__Ú	__slots__rE   Úclassmethodrp   Úpropertyrt   rv   rO   rm   ri   rƒ   r†   rˆ   rŽ   r–   rž   rœ   r   r¢   r«   r­   r°   r³   r·   rÔ   rÖ   ro   r0   r.   r3   r3   y   sÄ  … ñð Óð	€Ið $(Ø $Ø"&ØØ Ø&*ðK!àðK!ð !ðK!ð ð	K!ð
  ðK!ð ðK!ð ðK!ð $ðK!ð 
óK!ðZ ò0ó ð0ð" ò4ó ð4óVó!
ðJ òó ðð òó ðóóó	#ó	ô5ô,Fð "&ð%Øð%à	$ó%ð Ú?ó Ø?àÚWó ØWð AEð;Øð;Ø"=ð;à	ó;ó ó2ó9ó
ó!ð (,ð8
à-ð8
ð %ð8
ð 
ó	8
ðz (,ð5à-ð5ð %ð5ð 
ô	5r0   )Ú	metaclassc                ó|   — 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éÿÿÿÿ)rJ   r   )r    rì   rí   s      r.   r|   r|   õ  sW   € ô 4;¸4ÀÈTÓ3R€HØÐØ˜˜ˆ|ÐÜ
�$˜˜tÓ
$€CØ
€Ü˜3ÓÐÜ�4˜Ð!3Ó4°bÐ8Ð8r0   c                  ód   — e Zd ZdZ G d„ de«      Zej                  dd„«       Z	 	 	 	 d	d„Z	d
d„Z
y)rÝ   z‰Base class of all collectors.

    Collector create children through `collect()` and thus iteratively build
    the collection tree.
    c                  ó   — e Zd ZdZy)úCollector.CollectErrorz6An error during collection, contains a custom message.N©r>   r=   rW   rX   ro   r0   r.   ÚCollectErrorrñ     s   „ ÚDr0   ró   c                ó   — t        d«      ‚)z;Collect children (items and collectors) for this collector.Úabstract©ÚNotImplementedErrorrs   s    r.   ÚcollectzCollector.collect  s   € ô " *Ó-Ð-r0   c                ó.  — t        |j                  | j                  «      r@| j                  j	                  dd«      s$|j                  }t        |j                  d   «      S | j                  j	                  dd«      }|dk(  rd}| j                  ||¬«      S )zyReturn a representation of a collection failure.

        :param excinfo: Exception information for the failure.
        r»   Fr   r¾   r½   r¿   )rÄ   )rf   rº   ró   r_   rÍ   rg   ÚargsrÔ   )rl   r¶   Úexcr¾   s       r.   rÖ   zCollector.repr_failure  sˆ   € ô �g—m‘m T×%6Ñ%6Ô7ÀÇÁ×@UÑ@UØ˜ôA
ð —-‘-ˆCÜ�s—x‘x ‘{Ó#Ð#ð —+‘+×'Ñ'¨	°6Ó:ˆØ�fÒØˆGà×$Ñ$ W°GÐ$Ó<Ð<r0   c                óÚ   — t        | d«      rT|j                  }|j                  | j                  ¬«      }||k(  r|j                  t        ¬«      }|j                  |«      S |j                  S )Nr-   r,   )Úexcludepath)Úhasattrrµ   Úcutr-   ÚtracebackcutdirÚfilter)rl   r¶   rµ   Ú
ntracebacks       r.   r·   zCollector._traceback_filter-  s`   € Ü�4˜Ô Ø×)Ñ)ˆIØ"Ÿ™¨D¯I©I˜Ó6ˆJØ˜YÒ&Ø'Ÿ^™^¼˜^ÓH�
Ø×$Ñ$ WÓ-Ð-Ø× Ñ Ð r0   N)rV   zIterable[Item | Collector])r¶   rã   rV   rå   râ   )r>   r=   rW   rX   rË   ró   ÚabcÚabstractmethodrø   rÖ   r·   ro   r0   r.   rÝ   rÝ     sI   „ ñôE�yô Eð 	×Ñò.ó ð.ð
=Ø3ð=à	ó=ô*!r0   rÝ   iè  )Úmaxsizec                óp   — || v ry|j                   D ]"  }|| v sŒt        |j                  |«      «      c S  y )NÚ )Úparentsrg   Úrelative_to)Úinitial_pathsr-   r`   s      r.   Ú_check_initialpaths_for_relpathr  7  sE   € ð ˆ}ÑØà—,‘,ò 1ˆØ�]Ò"Ü�t×'Ñ'¨Ó/Ó0Ò0ð1ð r0   c                  ó€   ‡ — 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.Nc	                óš  •— |r;t        |t        «      r|�J ‚t        t        |«      }nt        |t        «      r|�J ‚|}|€J ‚|€O|j
                  }|�A|j                  |k7  r2	 |j                  |j                  «      }	t        |	«      }t        |«      }|| _        |€|€J ‚|j                  }|€T	 t        | j                  j                  |j                  j                  «      «      }
|
rt        |
«      }
|
�t!        |
¬«      }t"        ‰| �I  ||||||¬«       y # t        $ r Y Œ›w xY w# t        $ r t        |j                  |«      }
Y Œaw xY w)Nr,   )r:   r`   r_   ra   rm   r-   )rf   r3   r   r  r
   r:   r-   r	  rg   rh   r/   ra   r_   Úrootpathr  Ú_initialpathsr   rH   rE   )rl   r)   Úpath_or_parentr-   r:   r`   r_   ra   rm   ÚrelÚpath_strrT   s              €r.   rE   zFSCollector.__init__H  sg  ø€ ñ Ü˜.¬$Ô/Ø�~Ð%�~Üœk¨>Ó:‘Ü˜N¬DÔ1Ø�|Ð#�|Ø%�ØÐÐÐàˆ<Ø—9‘9ˆDØÐ! f§k¡k°TÒ&9ð$Ø×*Ñ*¨6¯;©;Ó7�Cô ˜s›8�DÜ “~�ØˆŒ	àˆ?ØÐ%Ð%Ð%Ø—n‘nˆGàˆ>ðXÜ'*Ø—I‘I×)Ñ)¨'¯.©.×*AÑ*AÓBó(�ñ Ü# HÓ-�ØÐ#Ü XÔ.�ä‰ÑØØØØØØð 	õ 	
øô1 "ò Ùðûô  ò XÜ:¸7×;PÑ;PÐRVÓW’ðXús$   Á#D Â08D( Ä	D%Ä$D%Ä(E
Å	E
)r)   r-   c               ó*   •— t        ‰| �  d|||dœ|¤ŽS )zThe public constructor.)r`   r)   r-   ro   )rH   rp   )r?   r`   r)   r-   rA   rT   s        €r.   rp   zFSCollector.from_parent‚  s!   ø€ ô ‰wÑ"ÐQ¨&¸ÀdÑQÈbÑQÐQr0   )NNNNNNNN)r)   rÚ   r  zPath | Node | Noner-   rÛ   r:   rà   r`   r×   r_   rØ   ra   rÙ   rm   zNodeId | NonerV   rÚ   )r)   rÚ   r-   rÛ   rV   r#   )r>   r=   rW   rX   rE   rè   rp   rY   rZ   s   @r.   r  r  E  s½   ø„ Ù/ð Ø-1Ø ØØ#'Ø $Ø"&Ø $ð8
àð8
ð +ð8
ð ð	8
ð
 ð8
ð !ð8
ð ð8
ð  ð8
ð ð8
ð 
õ8
ðt ð
 Ø ñ	Rð ð		Rð
 ð	Rð 
ô	Ró ô	Rr0   r  c                  ó   — e Zd ZdZy)ÚFilezOBase class for collecting tests from a file.

    :ref:`non-python tests`.
    Nrò   ro   r0   r.   r  r  �  s   „ òr0   r  c                  ó   — e Zd ZdZy)Ú	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ò   ro   r0   r.   r  r  –  s   „ òr0   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.
    Nc                ól   •— t        ‰| �  ||f|||dœ|¤Ž g | _        g | _        | j	                  «        y )N)r_   ra   rm   )rH   rE   Ú_report_sectionsÚuser_propertiesÚ-_check_item_and_collector_diamond_inheritance)rl   r:   r`   r_   ra   rm   rA   rT   s          €r.   rE   zItem.__init__°  sR   ø€ ô 	‰ÑØØð	
ð ØØñ	
ð ò	
ð =?ˆÔð :<ˆÔà×:Ñ:Õ<r0   c                óò   — t        | «      }d}t        ||d«      ryt        ||d«       dj                  d„ |j                  D «       «      }|r+t        j                  |j                  › d|› d�t        «       yy)	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  óV   K  — | ]!  }t        |t        «      sŒ|j                  –— Œ# y ­wr‚   )Ú
issubclassrÝ   r>   )r™   Úbases     r.   r›   zEItem._check_item_and_collector_diamond_inheritance.<locals>.<genexpr>Ý  s"   è ø€ ò 
Ø"´zÀ$Ì	Õ7RˆD�M�Mñ
ùs   ‚)˜)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/)	ÚtyperJ   ÚsetattrÚjoinÚ	__bases__rN   rO   r>   r"   )rl   r?   Ú	attr_nameÚproblemss       r.   r  z2Item._check_item_and_collector_diamond_inheritanceÍ  s‰   € ô
 �4‹jˆð @ˆ	Ü�3˜	 5Ô)ØÜ��Y Ô%à—9‘9ñ 
Ø&)§m¡mô
ó 
ˆñ Ü�M‰MØ—<‘<�.ð !%Ø%- Jð /gðgô
 õð r0   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ö   rs   s    r.   ÚruntestzItem.runtestê  s   € ô "Ð"PÓQÐQr0   c                óF   — |r| j                   j                  |||f«       yy)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Š   )rl   ÚwhenÚkeyÚcontents       r.   Úadd_report_sectionzItem.add_report_sectionô  s'   € ñ Ø×!Ñ!×(Ñ(¨$°°WÐ)=Õ>ð r0   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,   rs   s    r.   Ú
reportinfozItem.reportinfo  s   € ð �y‰y˜$ Ð"Ð"r0   c                ó¶   — | j                  «       }t        |d   «      }| j                  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À   rF   )r2  r    ra   Ú_node_location_to_relpathr$  rg   )rl   rì   r-   Ú	relfspaths       r.   rì   zItem.location  s^   € ð —?‘?Ó$ˆÜ˜H Q™KÓ(ˆØ—L‘L×:Ñ:¸4Ó@ˆ	Ü�H˜Q‘KÓ ¤CÑ'Ð'Ð'Ø˜8 A™;¨°©Ð4Ð4r0   )NNNN)r_   rØ   ra   rÙ   rm   rÜ   rV   rÚ   rÞ   )r-  rg   r.  rg   r/  rg   rV   rÚ   )rV   z.tuple[os.PathLike[str] | str, int | None, str])rV   ztuple[str, int | None, str])r>   r=   rW   rX   ÚnextitemrE   r  r  r  r+  r0  r2  r   rì   rY   rZ   s   @r.   r  r  ¨  s‰   ø„ ñð
 €Hð
 Ø $Ø"&Ø&*ð=ð ð	=ð
  ð=ð $ð=ð 
õ=ó:ð: 	×ÑòRó ðRó?ó"#ð ò
5ó ô
5r0   r  )r-   zstr | os.PathLike[str]rV   rg   )r    r3   rV   ztuple[str | Path, int | None])r
  zfrozenset[Path]r-   r
   rV   rà   )JÚ
__future__r   r  Úcollections.abcr   r   r   r   Ú	functoolsr   r	   r(   Úpathlibr
   Útypingr   r   r   r   r   r   rN   ÚpluggyÚ_pytest._codeÚ_pytestr   Ú_pytest._code.coder   r   r   r   Ú_pytest.compatr   r   Ú_pytest.configr   r   Ú_pytest.mark.structuresr   r   r   Ú_pytest.nodeidr   r   Ú_pytest.outcomesr   Ú_pytest.pathlibr    Ú_pytest.stashr!   Ú_pytest.warning_typesr"   Útyping_extensionsr#   Ú_pytest.mainr$   r+   r/   Ú__file__r`   r   r1   r2   ÚABCMetar6   ÚABCr3   r|   rÝ   r  r  r  r  r  ro   r0   r.   ú<module>rM     s  ðå "ã 
Ý $Ý $Ý $Ý *Ý %Ý Û 	Û Ý Ý Ý Ý Ý Ý  Ý Û ã ã Ý %Ý ,Ý +Ý (Ý -Ý &Ý $Ý !Ý 0Ý (Ý 1Ý 0Ý )Ý !Ý !Ý (Ý Ý /ñ Ý&õ %ð 
€ó
.ñ �w×'Ñ'Ó(×/Ñ/€ñ ˆTƒ]€ñ �K vÔ.€	ô)4ˆs�{‰{ô )4ôXy5ˆ3�7‰7˜hõ y5óx9ô&,!��c—g‘gô ,!ñ^ �4Ôð
Ø"ð
Ø*.ð
àò
ó ð
ôGR�)˜SŸW™Wô GRôTˆ;˜Ÿ™ô ô�˜SŸW™Wô ô$u5ˆ4�—‘õ u5r0   