a
    ˆÏ?eFh  ã                   @   sÜ  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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 m!Z! d dl m"Z" d dl#m$Z$ d dl#m%Z% d dl&m'Z' d dl&m(Z( d dl&m)Z) d d l*m+Z+ d d!l,m-Z- d d"l,m.Z. d d#l/m0Z0 d d$l1m2Z2 e�rÚd d%l3m4Z4 d d&lm5Z5 d'Z6eej7ƒj8Z9e:ee: d(œd)d*„Z;eedd+œd,d-„Z<ed. ee ee ed/œd0d1„Z=ed2d.d3�Z>G d4d5„ d5e?ƒZ@G d6d.„ d.e@d7�ZAd.eee:ef eeB f d8œd9d:„ZCG d;d<„ d<eAƒZDd=eee: d>œd?d@„ZEG dAdB„ dBeDƒZFG dCdD„ dDeFƒZGG dEdF„ dFeAƒZHdS )Gé    N)Ú	signature)ÚPath)ÚAny)ÚCallable)Úcast)ÚIterable)ÚIterator)ÚList)ÚMutableMapping)ÚOptional)Úoverload)ÚSet)ÚTuple)ÚType)ÚTYPE_CHECKING)ÚTypeVar)ÚUnion)Úgetfslineno)ÚExceptionInfo)ÚTerminalRepr)Ú	Traceback)Úcached_property)ÚLEGACY_PATH)ÚConfig)ÚConftestImportFailure)Ú#FSCOLLECTOR_GETHOOKPROXY_ISINITPATH)ÚNODE_CTOR_FSPATH_ARG)ÚMark)ÚMarkDecorator)ÚNodeKeywords)Úfail)Úabsolutepath)Ú
commonpath)ÚStash)ÚPytestWarning)ÚSession)Ú_TracebackStyleú/)ÚnodeidÚreturnc                 c   s¤   d}|   d¡}|dkrd}dV  |   t||¡}|dkr8q\|dkrN| d|… V  |ttƒ }q |   d|¡}|dkrrq–|dkrˆ| d|… V  |tdƒ }q\| r | V  dS )aè  Return the parent node IDs of a given node ID, inclusive.

    For the node ID

        "testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source"

    the result would be

        ""
        "testing"
        "testing/code"
        "testing/code/test_excinfo.py"
        "testing/code/test_excinfo.py::TestFormattedExcinfo"
        "testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source"

    Note that / components are only considered until the first ::.
    r   ú::éÿÿÿÿNÚ )ÚfindÚSEPÚlen)r(   ÚposZfirst_colonsÚat© r2   úP/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/_pytest/nodes.pyÚiterparentnodeids4   s&    
r4   )ÚpathÚfspathr)   c                 C   s&   t |ƒ| kr"td|›d| ›d�ƒ‚d S )NzPath(z) != z8
if both path and fspath are given they need to be equal)r   Ú
ValueError)r5   r6   r2   r2   r3   Ú_check_patha   s    ÿr8   ÚNode)Ú	node_typer5   r6   r)   c                 C   sV   |d ur t jtj| jd�dd� |d ur>|d ur:t||ƒ |S |d usJJ ‚t|ƒS d S )N)Znode_type_nameé   ©Ú
stacklevel)ÚwarningsÚwarnr   ÚformatÚ__name__r8   r   )r:   r5   r6   r2   r2   r3   Ú_imply_pathi   s    ÿü
rB   Ú	_NodeType)Úboundc                       s$   e Zd Zdd„ Z‡ fdd„Z‡  ZS )ÚNodeMetac                 O   s*   dj | j› d| j› �d�}t|d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)r@   Ú
__module__rA   r    )ÚselfÚkÚkwÚmsgr2   r2   r3   Ú__call__‚   s
    ÿûzNodeMeta.__call__c              
      sŒ   zt ƒ j|i |¤ŽW S  ty†   tt| dƒƒ‰ ‡ fdd„| ¡ D ƒ}ddlm} t 	|| › dt
|ƒ› d�ƒ¡ t ƒ j|i |¤Ž Y S 0 d S )NÚ__init__c                    s    i | ]\}}|ˆ j v r||“qS r2   )Ú
parameters)Ú.0rL   Úv©Úsigr2   r3   Ú
<dictcomp>�   ó    z$NodeMeta._create.<locals>.<dictcomp>é   )Ú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.)ÚsuperrO   Ú	TypeErrorr   ÚgetattrÚitemsZwarning_typesrY   r>   r?   Úset)rK   rL   rM   Zknown_kwrY   ©Ú	__class__rT   r3   Ú_create‹   s    ÿÿ	zNodeMeta._create)rA   rJ   Ú__qualname__rO   ra   Ú__classcell__r2   r2   r_   r3   rE   �   s   	rE   c                
   @   s  e Zd ZU dZeed< dZd@edee	 dee ee
 ee ddœdd	„Zed d
œdd„ƒZedd„ ƒZedœdd„Zeddœdd„Zeedœdd„ƒZedœdd„Zddœdd„Zddœdd„Zed  dœdd„ZdAeeef edd œd!d"„ZdBee ee d#œd$d%„Z dCee ee!d ef  d#œd&d'„Z"e#eee d#œd(d)„ƒZ$e#eeed*œd+d)„ƒZ$dDeee ee d*œd,d)„Z$e%e dœd-d.„Z&ee dœd/d0„Z'e(g e)f dd1œd2d3„Z*e+e, ee, d4œd5d6„Z-e.e/ e0d7œd8d9„Z1dEe.e/ d:e2d;œd<d=„Z3dFe.e/ d:eee2f d;œd>d?„Z4dS )Gr9   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.
    r6   )rH   ÚparentÚconfigÚsessionr5   Ú_nodeidÚ_storeÚ__dict__NzOptional[Node]zOptional[Session])rH   rd   re   rf   r6   r5   r(   r)   c                 C   sæ   || _ || _|r|| _n|s$tdƒ‚|j| _|r8|| _n|sDtdƒ‚|j| _|d u rh|d u rht|dd ƒ}tt| ƒ||d�| _t	| ƒ| _
g | _tƒ | _|d ur°d|vs¨J ‚|| _n"| js¾tdƒ‚| jjd | j  | _tƒ | _| j| _d S )Nz!config or parent must be providedz"session or parent must be providedr5   ©r6   z::()z!nodeid or parent must be providedr*   )rH   rd   re   r[   rf   r\   rB   Útyper5   r   ÚkeywordsÚown_markersr^   Úextra_keyword_matchesrg   r(   r#   Ústashrh   )rK   rH   rd   re   rf   r6   r5   r(   r2   r2   r3   rP   »   s4    
zNode.__init__)rd   c                 K   s4   d|v rt dƒ‚d|v r t dƒ‚| jf 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.
        re   z.config is not a valid argument for from_parentrf   z/session is not a valid argument for from_parentrd   )r[   ra   )Úclsrd   rM   r2   r2   r3   Úfrom_parentø   s
    zNode.from_parentc                 C   s   | j  | j¡S )z6fspath-sensitive hook proxy used to call pytest hooks.)rf   Úgethookproxyr5   ©rK   r2   r2   r3   Úihook
  s    z
Node.ihook©r)   c                 C   s   d  | jjt| dd ƒ¡S )Nz<{} {}>rH   )r@   r`   rA   r\   rs   r2   r2   r3   Ú__repr__  s    zNode.__repr__)Úwarningr)   c                 C   sN   t |tƒstd |¡ƒ‚t| ƒ\}}|dus0J ‚tj|dt|ƒ|d d� 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.
        z<warning must be an instance of Warning or subclass, got {!r}NrX   )ÚcategoryÚfilenameÚlineno)Ú
isinstanceÚWarningr7   r@   Úget_fslocation_from_itemr>   Úwarn_explicitÚstr)rK   rw   r5   rz   r2   r2   r3   r?     s    
ÿÿüz	Node.warnc                 C   s   | j S )z;A ::-separated string denoting its collection tree address.)rg   rs   r2   r2   r3   r(   9  s    zNode.nodeidc                 C   s
   t | jƒS ©N)Úhashrg   rs   r2   r2   r3   Ú__hash__>  s    zNode.__hash__c                 C   s   d S r€   r2   rs   r2   r2   r3   ÚsetupA  s    z
Node.setupc                 C   s   d S r€   r2   rs   r2   r2   r3   ÚteardownD  s    zNode.teardownc                 C   s.   g }| }|dur"|  |¡ |j}q| ¡  |S )zŠReturn list of all parent collectors up to self, starting from
        the root of collection tree.

        :returns: The nodes.
        N)Úappendrd   Úreverse)rK   ÚchainÚitemr2   r2   r3   Ú	listchainG  s    
zNode.listchainT)Úmarkerr…   r)   c                 C   sn   ddl m} t|tƒr|}nt|tƒr2t||ƒ}ntdƒ‚|| j|j< |rZ| j	 
|j¡ n| 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)Z_pytest.markr‹   r{   r   r   r\   r7   rl   rH   rm   r…   ÚmarkÚinsert)rK   rŠ   r…   r‹   Zmarker_r2   r2   r3   Ú
add_markerU  s    


zNode.add_marker)rH   r)   c                 C   s   dd„ | j |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                 s   s   | ]}|d  V  qdS )rX   Nr2   ©rR   Úxr2   r2   r3   Ú	<genexpr>s  rW   z$Node.iter_markers.<locals>.<genexpr>rG   )Úiter_markers_with_node©rK   rH   r2   r2   r3   Úiter_markersm  s    zNode.iter_markersc                 c   sD   t |  ¡ ƒD ]2}|jD ]&}|du s2t|ddƒ|kr||fV  qq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.
        NrH   )Úreversedr‰   rm   r\   )rK   rH   ÚnoderŒ   r2   r2   r3   r’   u  s    
zNode.iter_markers_with_nodec                 C   s   d S r€   r2   r“   r2   r2   r3   Úget_closest_marker‚  s    zNode.get_closest_marker)rH   Údefaultr)   c                 C   s   d S r€   r2   ©rK   rH   r˜   r2   r2   r3   r—   †  s    c                 C   s   t | j|d�|ƒ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.
        rG   )Únextr”   r™   r2   r2   r3   r—   Š  s    	c                 C   s$   t ƒ }|  ¡ D ]}| |j¡ q|S )z;Return a set of all extra keywords in self and any parents.)r^   r‰   Úupdatern   )rK   Zextra_keywordsrˆ   r2   r2   r3   Úlistextrakeywords•  s    zNode.listextrakeywordsc                 C   s   dd„ |   ¡ D ƒS )Nc                 S   s   g | ]
}|j ‘qS r2   rG   r�   r2   r2   r3   Ú
<listcomp>�  rW   z"Node.listnames.<locals>.<listcomp>)r‰   rs   r2   r2   r3   Ú	listnamesœ  s    zNode.listnames)Úfinr)   c                 C   s   | 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   Z_setupstateÚaddfinalizer)rK   rŸ   r2   r2   r3   r    Ÿ  s    zNode.addfinalizer)rp   r)   c                 C   s4   | }|rt ||ƒs|j}q|du s0t ||ƒs0J ‚|S )z¼Get the next 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{   rd   )rK   rp   Úcurrentr2   r2   r3   Ú	getparent¨  s
    zNode.getparent©Úexcinfor)   c                 C   s   |j S r€   )Ú	traceback)rK   r¤   r2   r2   r3   Ú_traceback_filterµ  s    zNode._traceback_filterzOptional[_TracebackStyle])r¤   Ústyler)   c                 C   s  ddl m} t|jtƒr&t |jj¡}t|jtj	ƒr@|jj
s@d}t|j|ƒrV|j ¡ S | j dd¡rnd}d}n| j}|dkr€d}|d u r¤| j dd¡d	kr d	}nd}| j d
d¡dkr¼d}nd}ztt ¡ ƒ| jjjk}W n tyð   d}Y n0 |jd|| j dd¡|||d�S )Nr   )ÚFixtureLookupErrorÚvalueÚ	fulltraceFÚlongÚautoÚtbstyleÚshortÚverboserX   TÚ
showlocals)ZfuncargsÚabspathr°   r§   ÚtbfilterÚtruncate_locals)Z_pytest.fixturesr¨   r{   r©   r   r   Zfrom_exc_infor¤   r    Ú	ExceptionrI   Z
formatreprre   Ú	getoptionr¦   r   ÚosÚgetcwdZinvocation_paramsÚdirÚOSErrorZgetrepr)rK   r¤   r§   r¨   r²   r³   r±   r2   r2   r3   Ú_repr_failure_py¸  sB    

úzNode._repr_failure_pyc                 C   s   |   ||¡S )z¯Return a representation of a collection or test failure.

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

        :param excinfo: Exception information for the failure.
        )rº   )rK   r¤   r§   r2   r2   r3   Úrepr_failureï  s    zNode.repr_failure)NNNNNN)T)N)N)N)N)N)5rA   rJ   rb   Ú__doc__r   Ú__annotations__Ú	__slots__r   r   r   r   rP   Úclassmethodrq   Úpropertyrt   rv   r|   r?   r(   Úintr‚   rƒ   r„   r	   r‰   r   r   ÚboolrŽ   r   r   r”   r   r’   r   r—   r   rœ   rž   r   Úobjectr    r   rC   r¢   r   ÚBaseExceptionr   r¦   r   rº   r»   r2   r2   r2   r3   r9   Ÿ   sˆ   
      ø÷=
' ÿþ	 ÿþ ÿþ	 ýü: ý
ü)Ú	metaclass)r–   r)   c                 C   sL   t | ddƒ}|dur |dd… S t | ddƒ}|dur<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.
    * "fspath": just a path

    :rtype: A tuple of (str|Path, int) with filename and 0-based line number.
    ÚlocationNé   Úobjr6   zunknown locationr+   )r\   r   )r–   rÆ   rÈ   r2   r2   r3   r}   ý  s    
r}   c                   @   sf   e Zd ZdZG dd„ deƒZeed  dœdd„Ze	e
 eeef dœd	d
„Ze	e
 edœdd„ZdS )Ú	Collectorz‰Base class of all collectors.

    Collector create children through `collect()` and thus iteratively build
    the collection tree.
    c                   @   s   e Zd ZdZdS )zCollector.CollectErrorz6An error during collection, contains a custom message.N©rA   rJ   rb   r¼   r2   r2   r2   r3   ÚCollectError  s   rË   )ÚItemrÉ   ru   c                 C   s   t dƒ‚dS )z;Collect children (items and collectors) for this collector.ZabstractN©ÚNotImplementedErrorrs   r2   r2   r3   Úcollect  s    zCollector.collectr£   c                 C   sX   t |j| jƒr0| j dd¡s0|j}t|jd ƒS | j dd¡}|dkrJd}| j||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Ë   re   rµ   r   Úargsrº   )rK   r¤   Úexcr­   r2   r2   r3   r»     s    ÿzCollector.repr_failurec                 C   sD   t | dƒr>|j}|j| jd�}||kr2|jtd�}|j |¡S |jS )Nr5   ©r5   )Zexcludepath)Úhasattrr¥   Zcutr5   ÚtracebackcutdirÚfilter)rK   r¤   r¥   Z
ntracebackr2   r2   r3   r¦   4  s    
zCollector._traceback_filterN)rA   rJ   rb   r¼   r´   rË   r   r   rÏ   r   rÄ   r   r   r»   r   r¦   r2   r2   r2   r3   rÉ     s   
þrÉ   r%   )rf   r5   r)   c                 C   s@   | j D ]4}t||ƒ|krt| |¡ƒ}|dkr2dn|  S qd S )NrF   r,   )Z_initialpathsr"   r   Úrelative_to)rf   r5   Zinitial_pathÚrelr2   r2   r3   Ú_check_initialpaths_for_relpath>  s
    
rØ   c                       s®   e Zd ZdZdee eeeef  ee ee	 ee ee
 ed ee	 ddœ	‡ fdd„Zedddœee ee dœ‡ fdd	„ƒZd
dœdd„Zee	d
f edœdd„Z‡  ZS )ÚFSCollectorz%Base class for filesystem collectors.Nr%   )	r6   Úpath_or_parentr5   rH   rd   re   rf   r(   r)   c	           
         sJ  |r@t |tƒr&|d u sJ ‚tt|ƒ}nt |tƒr@|d u s<J ‚|}tt| ƒ||d�}|d u r¬|j}|d ur¬|j|kr¬z| 	|j¡}	W n t
y”   Y n
0 t|	ƒ}| tjt¡}|| _|d u rÌ|d usÆJ ‚|j}|d u �r.zt| j 	|jj¡ƒ}W n t
�y   t||ƒ}Y n0 |�r.tjtk�r.| tjt¡}tƒ j||||||d� d S )Nrj   )rH   rd   re   rf   r(   r5   )r{   r9   r   rÙ   r   rB   rk   rH   r5   rÖ   r7   r   Úreplacer¶   Úsepr.   rf   re   ZrootpathrØ   rZ   rP   )
rK   r6   rÚ   r5   rH   rd   re   rf   r(   r×   r_   r2   r3   rP   I  sH    


úzFSCollector.__init__)r6   r5   c                   s   t ƒ jf |||dœ|¤ŽS )zThe public constructor.)rd   r6   r5   )rZ   rq   )rp   rd   r6   r5   rM   r_   r2   r3   rq     s    
zFSCollector.from_parentúos.PathLike[str]rj   c                 C   s   t jtdd� | j |¡S ©NrÇ   r<   )r>   r?   r   rf   rr   )rK   r6   r2   r2   r3   rr   ‹  s    zFSCollector.gethookproxy)r5   r)   c                 C   s   t jtdd� | j |¡S rÞ   )r>   r?   r   rf   Ú
isinitpath)rK   r5   r2   r2   r3   rß   �  s    zFSCollector.isinitpath)NNNNNNNN)rA   rJ   rb   r¼   r   r   r   r   r9   r   r   rP   r¿   rq   rr   rÂ   rß   rc   r2   r2   r_   r3   rÙ   F  s:           ÷ö6ûûrÙ   c                   @   s   e Zd ZdZdS )ÚFilezOBase class for collecting tests from a file.

    :ref:`non-python tests`.
    NrÊ   r2   r2   r2   r3   rà   ”  s   rà   c                       s²   e Zd ZdZdZdee ed ee ddœ‡ fdd„Zddœdd	„Z	ddœd
d„Z
eeeddœdd„Zeedef ee ef dœdd„Zeeeee ef dœdd„ƒZ‡  ZS )rÌ   z�Base class of all test invocation items.

    Note that for a single function there might be multiple test invocation items.
    Nr%   )re   rf   r(   r)   c                    s6   t ƒ j||f|||dœ|¤Ž g | _g | _|  ¡  d S )N)re   rf   r(   )rZ   rP   Ú_report_sectionsZuser_propertiesÚ-_check_item_and_collector_diamond_inheritance)rK   rH   rd   re   rf   r(   rM   r_   r2   r3   rP   £  s    þûúzItem.__init__ru   c                 C   s`   t | ƒ}d}t||dƒrdS t||dƒ d dd„ |jD ƒ¡}|r\t |j› d|› d	�t¡ dS )
z“
        Check if the current type inherits from both File and Collector
        at the same time, emitting a warning accordingly (#8447).
        Z)_pytest_diamond_inheritance_warning_shownFNTz, c                 s   s   | ]}t |tƒr|jV  qd S r€   )Ú
issubclassrÉ   rA   )rR   Úbaser2   r2   r3   r‘   Ð  s   zEItem._check_item_and_collector_diamond_inheritance.<locals>.<genexpr>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/)	rk   r\   ÚsetattrÚjoinÚ	__bases__r>   r?   rA   r$   )rK   rp   Ú	attr_nameÚproblemsr2   r2   r3   râ   À  s    
ÿÿúz2Item._check_item_and_collector_diamond_inheritancec                 C   s   t dƒ‚dS )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 subclassNrÍ   rs   r2   r2   r3   ÚruntestÝ  s    zItem.runtest)ÚwhenÚkeyÚcontentr)   c                 C   s   |r| j  |||f¡ 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…   )rK   rë   rì   rí   r2   r2   r3   Úadd_report_sectionæ  s    zItem.add_report_sectionrÝ   c                 C   s   | 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   r2   r2   r3   Ú
reportinfo÷  s    zItem.reportinfoc                 C   sL   |   ¡ }t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Ç   rX   )rï   r!   r¶   r6   rf   Z_node_location_to_relpathrk   r   )rK   rÆ   r5   Z	relfspathr2   r2   r3   rÆ     s
    zItem.location)NNNN)rA   rJ   rb   r¼   Únextitemr   r   r   rP   râ   rê   rî   r   r   rÁ   rï   r   rÆ   rc   r2   r2   r_   r3   rÌ   ›  s$       úø	$rÌ   )Ir¶   r>   Úinspectr   Úpathlibr   Útypingr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   Z_pytest._codeZ_pytestr   Z_pytest._code.coder   r   r   Z_pytest.compatr   r   Z_pytest.configr   r   Z_pytest.deprecatedr   r   Z_pytest.mark.structuresr   r   r   Z_pytest.outcomesr    Z_pytest.pathlibr!   r"   Z_pytest.stashr#   Z_pytest.warning_typesr$   Z_pytest.mainr%   r&   r.   Ú__file__rd   rÔ   r   r4   r8   rB   rC   rk   rE   r9   rÁ   r}   rÉ   rØ   rÙ   rà   rÌ   r2   r2   r2   r3   Ú<module>   sx   -	ü  `$.N