Ë
    æØjj®f  ã                  óˆ  — 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"Z5d:d#„Z6 eejn                  «      jp                  Z9 ed$«      Z: ed%d&¬'«      Z; G d(„ d)ejx                  «      Z= G d*„ d&ej|                  e=¬+«      Z?d;d,„Z@ G d-„ d.e?ej|                  «      ZA e
d/¬0«      	 	 	 	 	 	 d<d1„«       ZB G d2„ d3eAej|                  «      ZC G d4„ d5eCej|                  «      ZD G d6„ d7eCej|                  «      ZE G d8„ d9e?ej|                  «      ZFy)=é    )Ú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ú/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    úO/opt/eval-harness/bench_task/venv/lib/python3.12/site-packages/_pytest/nodes.pyÚnorm_sepr-   5   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__Z   s:   € ð!÷ ‰&˜Ÿ™Ð(¨¨#¯,©,¨Ð8ˆ&Ó
9ð 	ô 	ˆS˜%Ö r.   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.)ÚsuperrA   Ú	TypeErrorr   ÚgetattrÚitemsÚ
parametersÚwarning_typesrE   ÚwarningsÚwarnÚset)r=   r>   r?   ÚsigÚvÚknown_kwrE   Ú	__class__s          €r,   Ú_createzNodeMeta._createc   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]rT   r/   )r<   r;   Ú__qualname__Ú__doc__rA   rS   Ú__classcell__©rR   s   @r,   r4   r4   K   s   ø„ ñó!÷4ñ 4r.   r4   c                  ój  — 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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)7r1   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Úconfigr8   Úparentr+   ÚsessionNc                ó"  — || _         || _        |r|| _        n|st        d«      ‚|j                  | _        |r|| _        n|st        d«      ‚|j                  | _        |€|€J ‚|j
                  }|| _        t        | «      | _        g | _        t        «       | _
        |�d|vsJ ‚|| _        nB| j                  st        d«      ‚| j                  j                  dz   | j                   z   | _        t        «       | _        | j                  | _        y )Nz!config or parent must be providedz"session or parent must be providedz::()z!nodeid or parent must be providedz::)r8   r^   r]   rG   r_   r+   r   ÚkeywordsÚown_markersrN   Úextra_keyword_matchesr[   Únodeidr   Ústashr\   )Úselfr8   r^   r]   r_   r'   r+   rd   s           r,   rC   zNode.__init__“   s  € ð ˆŒ	ð ˆŒáà"(ˆD�KáÜÐ CÓDÐDØ Ÿ-™-ˆDŒKáà$+ˆD�LáÜÐ DÓEÐEØ!Ÿ>™>ˆDŒLàˆ<ØÐ%Ð%Ð%Ø—;‘;ˆDà"&ˆŒ	ô 3?¸tÓ2DˆŒð (*ˆÔô 03«uˆÔ"àÐØ Ñ'Ð'Ð'Ø!ˆD�Là—;’;ÜÐ CÓDÐDØŸ;™;×-Ñ-°Ñ4°t·y±yÑ@ˆDŒLô "›GˆŒ
à—j‘jˆ�r.   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_parentr_   z/session is not a valid argument for from_parentr^   © )rG   rS   )r=   r^   r?   s      r,   Úfrom_parentzNode.from_parentÑ   sC   € ð �r‰>ÜÐLÓMÐMØ˜‰?ÜÐMÓNÐNØˆs�{‰{Ñ/ &Ð/¨BÑ/Ð/r.   c                óL   — | j                   j                  | j                  «      S )z4Path-sensitive hook proxy used to call pytest hooks.)r_   Úgethookproxyr+   ©rf   s    r,   Úihookz
Node.ihookã   s   € ð �|‰|×(Ñ(¨¯©Ó3Ð3r.   c                ód   — dj                  | j                  j                  t        | dd «      «      S )Nz<{} {}>r8   )r:   rR   r<   rH   rl   s    r,   Ú__repr__zNode.__repr__è   s(   € Ø×Ñ §¡× 7Ñ 7¼ÀÀvÈtÓ9TÓUÐUr.   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 NrD   )ÚcategoryÚfilenameÚlineno)Ú
isinstanceÚWarningÚ
ValueErrorÚget_fslocation_from_itemrL   Úwarn_explicitÚstr)rf   Úwarningr+   rs   s       r,   rM   z	Node.warnë   sc   € ô, ˜'¤7Ô+ÜØJÈ7È+ÐVóð ô 0°Ó5‰ˆˆfØÐ!Ð!Ð!Ü×ÑØØÜ˜“YØ˜A‘:ö		
r.   c                ó   — | j                   S )z;A ::-separated string denoting its collection tree address.)r[   rl   s    r,   rd   zNode.nodeid  s   € ð �|‰|Ðr.   c                ó,   — t        | j                  «      S ©N)Úhashr[   rl   s    r,   Ú__hash__zNode.__hash__  s   € Ü�D—L‘LÓ!Ð!r.   c                 ó   — y r}   rh   rl   s    r,   Úsetupz
Node.setup  ó   € Ør.   c                 ó   — y r}   rh   rl   s    r,   ÚteardownzNode.teardown  r‚   r.   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^   )rf   r^   s     r,   Úiter_parentszNode.iter_parents  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)rf   ÚchainÚitems      r,   Ú	listchainzNode.listchain)  sA   € ð ˆØ ˆØÐØ�L‰L˜ÔØ—;‘;ˆDð Ñð 	�‰ŒØˆr.   c                óT  — ddl m} t        |t        «      r|}n(t        |t        «      rt        ||«      }nt        d«      ‚|| 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Ž   rt   r   ry   rH   rv   ra   r8   rb   rˆ   ÚmarkÚinsert)rf   Úmarkerrˆ   rŽ   Úmarker_s        r,   Ú
add_markerzNode.add_marker4  s   € õ 	*ä�fœmÔ,Ø‰GÜ˜¤Ô$Ü˜h¨Ó/‰GäÐFÓGÐGØ&-ˆ�‰�g—l‘lÑ#ÙØ×Ñ×#Ñ# G§L¡LÕ1à×Ñ×#Ñ# A w§|¡|Õ4r.   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)rD   Nrh   )Ú.0Úxs     r,   ú	<genexpr>z$Node.iter_markers.<locals>.<genexpr>P  s   è ø€ ÒE˜��!•ÑEùs   ‚r7   )Úiter_markers_with_node©rf   r8   s     r,   Úiter_markerszNode.iter_markersJ  s   € ñ F˜d×9Ñ9¸tÐ9ÓDÔEÐEr.   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.
        Nr8   )r†   rb   rH   )rf   r8   Únoder�   s       r,   rš   zNode.iter_markers_with_nodeR  sT   è ø€ ð ×%Ñ%Ó'ò 	%ˆDØ×(Ñ(ò %�Ø�<¤7¨4°¸Ó#>À$Ó#FØ ˜*Ó$ñ%ñ	%ùs
   ‚5A¸Ac                 ó   — y r}   rh   r›   s     r,   Úget_closest_markerzNode.get_closest_marker_  s   € Ø<?r.   c                 ó   — y r}   rh   ©rf   r8   Údefaults      r,   r    zNode.get_closest_markerb  s   € ØDGr.   c                ó:   — t        | j                  |¬«      |«      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.
        r7   )Únextrœ   r¢   s      r,   r    zNode.get_closest_markere  s   € ô �D×%Ñ%¨4Ð%Ó0°'Ó:Ð:r.   c                óz   — t        «       }| j                  «       D ]  }|j                  |j                  «       Œ |S )z;Return a set of all extra keywords in self and any parents.)rN   rŒ   Úupdaterc   )rf   Úextra_keywordsr‹   s      r,   ÚlistextrakeywordszNode.listextrakeywordsn  s9   € ä#&£5ˆØ—N‘NÓ$ò 	>ˆDØ×!Ñ! $×"<Ñ"<Õ=ð	>àÐr.   c                ó\   — | j                  «       D �cg c]  }|j                  ‘Œ c}S c c}w r}   )rŒ   r8   )rf   r˜   s     r,   Ú	listnameszNode.listnamesu  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)r_   Ú_setupstateÚaddfinalizer)rf   Úfins     r,   r®   zNode.addfinalizerx  s   € ð 	�‰× Ñ ×-Ñ-¨c°4Õ8r.   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†   rt   )rf   r=   rž   s      r,   Ú	getparentzNode.getparent�  s0   € ð ×%Ñ%Ó'ò 	ˆDÜ˜$ Õ$Ø’ð	ð r.   c                ó   — |j                   S r}   )Ú	traceback)rf   Úexcinfos     r,   Ú_traceback_filterzNode._traceback_filter�  s   € Ø× Ñ Ð r.   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ÚshortrD   Té   Ú
showlocals)ÚfuncargsÚabspathr¿   ÚstyleÚtbfilterÚtruncate_localsÚtruncate_args)Ú_pytest.fixturesr·   rt   r¸   r   r   Úfrom_exceptionÚcauser   Ú	Exceptionr9   Ú
formatreprr]   Ú	getoptionrµ   Úget_verbosityr
   r&   ÚgetcwdÚinvocation_paramsÚdirÚOSErrorÚgetrepr)rf   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Ò   )rf   r´   rÂ   s      r,   Úrepr_failurezNode.repr_failureÊ  s   € ð ×$Ñ$ W¨eÓ4Ð4r.   )NNNNNN)r8   ry   r^   úNode | Noner]   úConfig | Noner_   úSession | Noner'   ÚNoner+   úPath | Nonerd   ú
str | NonerT   rØ   )r^   r1   rT   r!   )rT   zpluggy.HookRelay)rT   ry   )rz   ru   rT   rØ   )rT   Úint©rT   rØ   )rT   zIterator[Node])rT   z
list[Node])T)r’   zstr | MarkDecoratorrˆ   ÚboolrT   rØ   r}   )r8   rÚ   rT   zIterator[Mark])r8   rÚ   rT   zIterator[tuple[Node, Mark]])r8   ry   rT   úMark | None)r8   ry   r£   r   rT   r   )r8   ry   r£   rÞ   rT   rÞ   )rT   zset[str])rT   z	list[str])r¯   zCallable[[], object]rT   rØ   )r=   ztype[_NodeType]rT   z_NodeType | None©r´   úExceptionInfo[BaseException]rT   r   )r´   rà   rÂ   úTracebackStyle | NonerT   r   )r´   rà   rÂ   rá   rT   ústr | TerminalRepr)r<   r;   rU   rV   Ú__annotations__Ú	__slots__rC   Úclassmethodri   Úpropertyrm   ro   rM   rd   r   r�   r„   r†   rŒ   r”   rœ   rš   r   r    r©   r«   r®   r±   rµ   rÒ   rÔ   rh   r.   r,   r1   r1   w   s�  … ñð Óð	€Ið #Ø $Ø"&ØØ Ø!ð<!àð<!ð ð<!ð ð	<!ð
  ð<!ð ð<!ð ð<!ð ð<!ð 
ó<!ð| ò0ó ð0ð" ò4ó ð4óVó!
ðJ òó ðó"óóó	#ó	ô5ô,Fð "&ð%Øð%à	$ó%ð Ú?ó Ø?àÚGó ØGô;óó2ó9ó
ó!ð (,ð8
à-ð8
ð %ð8
ð 
ó	8
ðz (,ð5à-ð5ð %ð5ð 
ô	5r.   )Ú	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éÿÿÿÿ)rH   r   )rž   ré   rê   s      r,   rw   rw   Ø  sW   € ô 4;¸4ÀÈTÓ3R€HØÐØ˜˜ˆ|ÐÜ
�$˜˜tÓ
$€CØ
€Ü˜3ÓÐÜ�4˜Ð!3Ó4°bÐ8Ð8r.   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)Ú	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y)úCollector.CollectErrorz6An error during collection, contains a custom message.N©r<   r;   rU   rV   rh   r.   r,   ÚCollectErrorrï   ò  s   „ ÚDr.   rñ   c                ó   — t        d«      ‚)z;Collect children (items and collectors) for this collector.Úabstract©ÚNotImplementedErrorrl   s    r,   ÚcollectzCollector.collectõ  s   € ô " *Ó-Ð-r.   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Â   )rt   r¸   rñ   r]   rË   ry   ÚargsrÒ   )rf   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Ð$Ó<Ð<r.   c                óÚ   — t        | d«      rT|j                  }|j                  | j                  ¬«      }||k(  r|j                  t        ¬«      }|j                  |«      S |j                  S )Nr+   r*   )Úexcludepath)Úhasattrr³   Úcutr+   ÚtracebackcutdirÚfilter)rf   r´   r³   Ú
ntracebacks       r,   rµ   zCollector._traceback_filter  s`   € Ü�4˜Ô Ø×)Ñ)ˆIØ"Ÿ™¨D¯I©I˜Ó6ˆJØ˜YÒ&Ø'Ÿ^™^¼˜^ÓH�
Ø×$Ñ$ WÓ-Ð-Ø× Ñ Ð r.   N)rT   zIterable[Item | Collector])r´   rà   rT   râ   rß   )r<   r;   rU   rV   rÉ   rñ   ÚabcÚabstractmethodrö   rÔ   rµ   rh   r.   r,   rí   rí   ë  sI   „ ñôE�yô Eð 	×Ñò.ó ð.ð
=Ø3ð=à	ó=ô*!r.   rí   iè  )Úmaxsizec                óp   — || v ry|j                   D ]"  }|| v sŒt        |j                  |«      «      c S  y )NÚ )Úparentsry   Úrelative_to)Úinitial_pathsr+   r^   s      r,   Ú_check_initialpaths_for_relpathr	    sE   € ð ˆ}ÑØà—,‘,ò 1ˆØ�]Ò"Ü�t×'Ñ'¨Ó/Ó0Ò0ð1ð r.   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                  }|€F	 t        | j                  j                  |j                  j                  «      «      }|rt        |«      }t         ‰
| �E  ||||||¬«       y # t        $ r Y Œ�w xY w# t        $ r t        |j                  |«      }Y ŒSw xY w)N)r8   r^   r]   r_   rd   r+   )rt   r1   r   r  r
   r8   r+   r  ry   rv   r-   r_   r]   Úrootpathr	  Ú_initialpathsrF   rC   )rf   r'   Úpath_or_parentr+   r8   r^   r]   r_   rd   ÚrelrR   s             €r,   rC   zFSCollector.__init__+  sT  ø€ ñ Ü˜.¬$Ô/Ø�~Ð%�~Üœk¨>Ó:‘Ü˜N¬DÔ1Ø�|Ð#�|Ø%�ØÐÐÐàˆ<Ø—9‘9ˆDØÐ! f§k¡k°TÒ&9ð$Ø×*Ñ*¨6¯;©;Ó7�Cô ˜s›8�DÜ “~�ØˆŒ	àˆ?ØÐ%Ð%Ð%Ø—n‘nˆGàˆ>ðVÜ˜TŸY™Y×2Ñ2°7·>±>×3JÑ3JÓKÓL�ñ Ü! &Ó)�ä‰ÑØØØØØØð 	õ 	
øô) "ò Ùðûô ò VÜ8¸×9NÑ9NÐPTÓU’ðVús$   Á#D Â08D Ä	DÄDÄD<Ä;D<)r'   r+   c               ó*   •— t        ‰| �  d|||dœ|¤ŽS )zThe public constructor.)r^   r'   r+   rh   )rF   ri   )r=   r^   r'   r+   r?   rR   s        €r,   ri   zFSCollector.from_parenta  s!   ø€ ô ‰wÑ"ÐQ¨&¸ÀdÑQÈbÑQÐQr.   )NNNNNNNN)r'   rØ   r  zPath | Node | Noner+   rÙ   r8   rÚ   r^   rÕ   r]   rÖ   r_   r×   rd   rÚ   rT   rØ   )r'   rØ   r+   rÙ   rT   r!   )r<   r;   rU   rV   rC   rå   ri   rW   rX   s   @r,   r  r  (  s½   ø„ Ù/ð Ø-1Ø ØØ"Ø $Ø"&Ø!ð4
àð4
ð +ð4
ð ð	4
ð
 ð4
ð ð4
ð ð4
ð  ð4
ð ð4
ð 
õ4
ðl ð
 Ø ñ	Rð ð		Rð
 ð	Rð 
ô	Ró ô	Rr.   r  c                  ó   — e Zd ZdZy)ÚFilezOBase class for collecting tests from a file.

    :ref:`non-python tests`.
    Nrð   rh   r.   r,   r  r  n  s   „ òr.   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ð   rh   r.   r,   r  r  u  s   „ òr.   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]   r_   rd   )rF   rC   Ú_report_sectionsÚuser_propertiesÚ-_check_item_and_collector_diamond_inheritance)rf   r8   r^   r]   r_   rd   r?   rR   s          €r,   rC   zItem.__init__�  sR   ø€ ô 	‰ÑØØð	
ð ØØñ	
ð ò	
ð =?ˆÔð :<ˆÔà×:Ñ:Õ<r.   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/)	ÚtyperH   ÚsetattrÚjoinÚ	__bases__rL   rM   r<   r    )rf   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ô
 õð r.   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ô   rl   s    r,   ÚruntestzItem.runtestÉ  s   € ô "Ð"PÓQÐQr.   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ˆ   )rf   ÚwhenÚkeyÚcontents       r,   Úadd_report_sectionzItem.add_report_sectionÓ  s'   € ñ Ø×!Ñ!×(Ñ(¨$°°WÐ)=Õ>ð r.   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*   rl   s    r,   Ú
reportinfozItem.reportinfoä  s   € ð �y‰y˜$ Ð"Ð"r.   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¾   rD   )r/  r   r_   Ú_node_location_to_relpathr!  ry   )rf   ré   r+   Ú	relfspaths       r,   ré   zItem.locationñ  s^   € ð —?‘?Ó$ˆÜ˜H Q™KÓ(ˆØ—L‘L×:Ñ:¸4Ó@ˆ	Ü�H˜Q‘KÓ ¤CÑ'Ð'Ð'Ø˜8 A™;¨°©Ð4Ð4r.   )NNNN)r]   rÖ   r_   r×   rd   rÚ   rT   rØ   rÜ   )r*  ry   r+  ry   r,  ry   rT   rØ   )rT   z.tuple[os.PathLike[str] | str, int | None, str])rT   ztuple[str, int | None, str])r<   r;   rU   rV   ÚnextitemrC   r  r  r  r(  r-  r/  r   ré   rW   rX   s   @r,   r  r  ‡  s‰   ø„ ñð
 €Hð
 Ø $Ø"&Ø!ð=ð ð	=ð
  ð=ð ð=ð 
õ=ó:ð: 	×ÑòRó ðRó?ó"#ð ò
5ó ô
5r.   r  )r+   zstr | os.PathLike[str]rT   ry   )rž   r1   rT   ztuple[str | Path, int | None])r  zfrozenset[Path]r+   r
   rT   rÚ   )GÚ
__future__r   r  Úcollections.abcr   r   r   r   Ú	functoolsr   r	   r&   Úpathlibr
   Útypingr   r   r   r   r   r   rL   Ú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)   r-   Ú__file__r^   rþ   r/   r0   ÚABCMetar4   ÚABCr1   rw   rí   r	  r  r  r  r  rh   r.   r,   ú<module>rI     sy  ðå "ã 
Ý $Ý $Ý $Ý *Ý %Ý Û 	Û Ý Ý Ý Ý Ý Ý  Ý Û ã ã Ý %Ý ,Ý +Ý (Ý -Ý &Ý $Ý !Ý 0Ý (Ý 1Ý 0Ý !Ý (Ý Ý /ñ Ý&õ %ð 
€ó
.ñ �w×'Ñ'Ó(×/Ñ/€ñ ˆTƒ]€ñ �K vÔ.€	ô)4ˆs�{‰{ô )4ôX^5ˆ3�7‰7˜hõ ^5óB9ô&,!��c—g‘gô ,!ñ^ �4Ôð
Ø"ð
Ø*.ð
àò
ó ð
ôCR�)˜SŸW™Wô CRôLˆ;˜Ÿ™ô ô�˜SŸW™Wô ô$u5ˆ4�—‘õ u5r.   