U
    `»{jsg  ã                   @  s¸  d dl mZ d dl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
mZ d dl
mZ d dl
mZ d dl
mZ d dlZd dlZd dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm Z  d dl!m"Z" d dl!m#Z# d dl$m%Z% d dl&m'Z' d dl(m)Z) d dl(m*Z* d dl(m+Z+ d dl,m-Z- d dl.m/Z/ d dl.m0Z0 d d l1m2Z2 d d!l3m4Z4 e�rÎd d"l5m6Z6 d d#l7m8Z8 d$Z9e	ej:ƒj;Z<ed%ƒZ=d&d'd(d)d*œd+d,„Z>ed-d.d/�Z?G d0d1„ d1ej@ƒZAG d2d.„ d.ejBeAd3�ZCd.d4d5œd6d7„ZDG d8d9„ d9eCejBƒZEd:d)d;d<œd=d>„ZFG d?d@„ d@eEejBƒZGG dAdB„ dBeGejBƒZHG dCdD„ dDeGejBƒZIG dEdF„ dFeCejBƒZJdS )Gé    )ÚannotationsN)Úcached_property)Ú	signature)ÚPath)ÚAny)ÚCallable)Úcast)ÚIterable)ÚIterator)ÚMutableMapping)ÚNoReturn)Úoverload)ÚTYPE_CHECKING)ÚTypeVar)Úgetfslineno)ÚExceptionInfo)ÚTerminalRepr)Ú	Traceback)ÚTracebackStyle)ÚLEGACY_PATH)ÚConfig)ÚConftestImportFailure)Ú_check_path)ÚNODE_CTOR_FSPATH_ARG)ÚMark)ÚMarkDecorator)ÚNodeKeywords)Úfail)Úabsolutepath)Ú
commonpath)ÚStash)ÚPytestWarning)ÚSelf)ÚSessionú/Ú_Tz
type[Node]úPath | NoneúLEGACY_PATH | Noner   )Ú	node_typeÚpathÚfspathÚreturnc                 C  sV   |d k	r t jtj| jd�dd� |d k	r>|d k	r:t||ƒ |S |d k	sJt‚t|ƒS d S )N)Znode_type_nameé   )Ú
stacklevel)ÚwarningsÚwarnr   ÚformatÚ__name__r   ÚAssertionErrorr   )r(   r)   r*   © r3   úL/var/www/html/bwave/python/venv/lib/python3.8/site-packages/_pytest/nodes.pyÚ_imply_path<   s    ÿü
r5   Ú	_NodeTypeÚNode)Úboundc                      s6   e Zd ZdZddœdd„Zdddœ‡ fd	d
„Z‡  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                 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)r0   Ú
__module__r1   r   )ÚclsÚkÚkwÚmsgr3   r3   r4   Ú__call__c   s
    üÿzNodeMeta.__call__ztype[_T]r%   ©r@   r+   c              
     s†   zt ƒ j||ŽW S  tk
r€   tt| dƒƒ‰ ‡ fdd„| ¡ D ƒ}ddlm} t 	|| › dt
|ƒ› d�ƒ¡ t ƒ j||Ž Y S X d S )NÚ__init__c                   s    i | ]\}}|ˆ j kr||“qS r3   )Ú
parameters)Ú.0rA   Úv©Úsigr3   r4   Ú
<dictcomp>q   s     
  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.)ÚsuperrD   Ú	TypeErrorr   ÚgetattrÚitemsZwarning_typesrN   r.   r/   Úset)r@   rA   rB   Zknown_kwrN   ©Ú	__class__rJ   r4   Ú_createl   s    ÿÿ	zNodeMeta._create)r1   r?   Ú__qualname__Ú__doc__rD   rV   Ú__classcell__r3   r3   rT   r4   r9   T   s   	r9   c                
   @  sÂ  e Zd ZU dZded< dZd^dddd	d
ddddœdd„Zed ddœdd„ƒZe	ddœdd„ƒZ
ddœdd„Zdddœdd„Ze	ddœdd „ƒZd!dœd"d#„Zddœd$d%„Zddœd&d'„Zd(dœd)d*„Zd+dœd,d-„Zd_d/d0dd1œd2d3„Zd`dd4d5œd6d7„Zdadd8d5œd9d:„Zedd;d5œd<d=„ƒZedd>d>d?œd@d=„ƒZdbdd;d;d?œdAd=„ZdBdœdCdD„ZdEdœdFdG„ZdHddIœdJdK„ZdLdMdNœdOdP„ZdQdRdSœdTdU„ZdcdQdVdWdXœdYdZ„ZdddQdVd[dXœd\d]„ZdS )er7   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*   )r=   ÚparentÚconfigÚsessionr)   Ú_nodeidÚ_storeÚ__dict__NÚstrúNode | NoneúConfig | NoneúSession | Noner'   r&   ú
str | NoneÚNone)r=   rZ   r[   r\   r*   r)   Únodeidr+   c                 C  sæ   || _ || _|r|| _n|s$tdƒ‚|j| _|r8|| _n|sDtdƒ‚|j| _|d krh|d krht|dd ƒ}tt| ƒ||d�| _t	| ƒ| _
g | _tƒ | _|d k	r°d|ks¨t‚|| _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 providedr)   ©r*   z::()z!nodeid or parent must be providedz::)r=   rZ   r[   rP   r\   rQ   r5   Útyper)   r   ÚkeywordsÚown_markersrS   Úextra_keyword_matchesr2   r]   rf   r    Ústashr^   )Úselfr=   rZ   r[   r\   r*   r)   rf   r3   r3   r4   rF   œ   s4    
zNode.__init__r"   )rZ   r+   c                 K  s4   d|krt dƒ‚d|k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.
        r[   z.config is not a valid argument for from_parentr\   z/session is not a valid argument for from_parentrZ   )rP   rV   )r@   rZ   rB   r3   r3   r4   Úfrom_parentÙ   s
    zNode.from_parentzpluggy.HookRelayr:   c                 C  s   | j  | j¡S )z6fspath-sensitive hook proxy used to call pytest hooks.)r\   Zgethookproxyr)   ©rm   r3   r3   r4   Úihookë   s    z
Node.ihookc                 C  s   d  | jjt| dd ƒ¡S )Nz<{} {}>r=   )r0   rU   r1   rQ   ro   r3   r3   r4   Ú__repr__ð   s    zNode.__repr__ÚWarning)Úwarningr+   c                 C  sN   t |tƒstd|›�ƒ‚t| ƒ\}}|dk	s0t‚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.
        z8warning must be an instance of Warning or subclass, got NrM   )ÚcategoryÚfilenameÚlineno)Ú
isinstancerr   Ú
ValueErrorÚget_fslocation_from_itemr2   r.   Úwarn_explicitr`   )rm   rs   r)   rv   r3   r3   r4   r/   ó   s    
ÿüz	Node.warnc                 C  s   | j S )z;A ::-separated string denoting its collection tree address.)r]   ro   r3   r3   r4   rf     s    zNode.nodeidÚintc                 C  s
   t | jƒS ©N)Úhashr]   ro   r3   r3   r4   Ú__hash__  s    zNode.__hash__c                 C  s   d S r|   r3   ro   r3   r3   r4   Úsetup   s    z
Node.setupc                 C  s   d S r|   r3   ro   r3   r3   r4   Úteardown#  s    zNode.teardownzIterator[Node]c                 c  s   | }|dk	r|V  |j }q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)rZ   )rm   rZ   r3   r3   r4   Úiter_parents&  s    zNode.iter_parentsz
list[Node]c                 C  s.   g }| }|dk	r"|  |¡ |j}q| ¡  |S )zxReturn a list of all parent collectors starting from the root of the
        collection tree down to and including self.N)ÚappendrZ   Úreverse)rm   ÚchainÚitemr3   r3   r4   Ú	listchain1  s    
zNode.listchainTzstr | MarkDecoratorÚbool)Ú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‰   rw   r   r`   rQ   rx   ri   r=   rj   r‚   ÚmarkÚinsert)rm   rˆ   r‚   r‰   Zmarker_r3   r3   r4   Ú
add_marker<  s    

zNode.add_markerzIterator[Mark])r=   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 )rM   Nr3   ©rH   Úxr3   r3   r4   Ú	<genexpr>X  s     z$Node.iter_markers.<locals>.<genexpr>r<   )Úiter_markers_with_node©rm   r=   r3   r3   r4   Úiter_markersR  s    zNode.iter_markerszIterator[tuple[Node, Mark]]c                 c  s@   |   ¡ D ]2}|jD ]&}|dks.t|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.
        Nr=   )r�   rj   rQ   )rm   r=   ÚnoderŠ   r3   r3   r4   r�   Z  s    
zNode.iter_markers_with_nodezMark | Nonec                 C  s   d S r|   r3   r‘   r3   r3   r4   Úget_closest_markerg  s    zNode.get_closest_markerr   )r=   Údefaultr+   c                 C  s   d S r|   r3   ©rm   r=   r•   r3   r3   r4   r”   j  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.
        r<   )Únextr’   r–   r3   r3   r4   r”   m  s    zset[str]c                 C  s$   t ƒ }|  ¡ D ]}| |j¡ q|S )z;Return a set of all extra keywords in self and any parents.)rS   r†   Úupdaterk   )rm   Zextra_keywordsr…   r3   r3   r4   Úlistextrakeywordsv  s    zNode.listextrakeywordsz	list[str]c                 C  s   dd„ |   ¡ D ƒS )Nc                 S  s   g | ]
}|j ‘qS r3   r<   r�   r3   r3   r4   Ú
<listcomp>~  s     z"Node.listnames.<locals>.<listcomp>)r†   ro   r3   r3   r4   Ú	listnames}  s    zNode.listnameszCallable[[], object])Ú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)r\   Z_setupstateÚaddfinalizer)rm   rœ   r3   r3   r4   r�   €  s    zNode.addfinalizerztype[_NodeType]z_NodeType | NonerE   c                 C  s$   |   ¡ D ]}t||ƒr|  S q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�   rw   )rm   r@   r“   r3   r3   r4   Ú	getparent‰  s    

zNode.getparentúExceptionInfo[BaseException]r   ©Úexcinfor+   c                 C  s   |j S r|   )Ú	traceback)rm   r¡   r3   r3   r4   Ú_traceback_filter•  s    zNode._traceback_filterzTracebackStyle | Noner   )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 kr¤| j dd¡d	kr d	}nd}| j ¡ d
kr¸d}nd}| j ¡ dkrÎdnd}ztt ¡ ƒ| jjjk}W n tk
�r   d}Y nX |jd|| j dd¡||||d�S )Nr   )ÚFixtureLookupErrorÚvalueÚ	fulltraceFÚlongÚautoÚtbstyleÚshortrM   Té   Ú
showlocals)ZfuncargsÚabspathr­   r¤   ÚtbfilterÚtruncate_localsÚtruncate_args)Z_pytest.fixturesr¥   rw   r¦   r   r   Úfrom_exceptionÚcauser   Ú	Exceptionr>   Z
formatreprr[   Ú	getoptionr£   Zget_verbosityr   ÚosÚgetcwdZinvocation_paramsÚdirÚOSErrorZgetrepr)rm   r¡   r¤   r¥   r¯   r°   r±   r®   r3   r3   r4   Ú_repr_failure_py˜  sF    

ùzNode._repr_failure_pyústr | TerminalReprc                 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º   )rm   r¡   r¤   r3   r3   r4   Úrepr_failureÒ  s    zNode.repr_failure)NNNNNN)T)N)N)N)N)N)r1   r?   rW   rX   Ú__annotations__Ú	__slots__rF   Úclassmethodrn   Úpropertyrp   rq   r/   rf   r~   r   r€   r�   r†   rŒ   r’   r�   r   r”   r™   r›   r�   rž   r£   rº   r¼   r3   r3   r3   r4   r7   €   sR   
      ø=%	 ÿ		 ý= ý)Ú	metaclassztuple[str | Path, int | None])r“   r+   c                 C  sL   t | ddƒ}|dk	r |dd… S t | ddƒ}|dk	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.
    * "path": just a path

    :rtype: A tuple of (str|Path, int) with filename and 0-based line number.
    ÚlocationNr¬   Úobjr)   zunknown locationéÿÿÿÿ)rQ   r   )r“   rÂ   rÃ   r3   r3   r4   ry   à  s    
ry   c                   @  sT   e Zd ZdZG dd„ deƒZejddœdd„ƒZdd	d
œdd„Z	dd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©r1   r?   rW   rX   r3   r3   r3   r4   ÚCollectErrorú  s   rÇ   zIterable[Item | Collector]r:   c                 C  s   t dƒ‚dS )z;Collect children (items and collectors) for this collector.ZabstractN©ÚNotImplementedErrorro   r3   r3   r4   Úcollectý  s    zCollector.collectrŸ   r»   r    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¤   )rw   r¦   rÇ   r[   rµ   r`   Úargsrº   )rm   r¡   Úexcrª   r3   r3   r4   r¼     s     ÿzCollector.repr_failurer   c                 C  sB   t | dƒr<|j}|j| jd�}||kr2|jtd�}| |¡S |jS )Nr)   ©r)   )Zexcludepath)Úhasattrr¢   Úcutr)   ÚtracebackcutdirÚfilter)rm   r¡   r¢   Z
ntracebackr3   r3   r4   r£     s    

zCollector._traceback_filterN)r1   r?   rW   rX   r´   rÇ   ÚabcÚabstractmethodrÊ   r¼   r£   r3   r3   r3   r4   rÅ   ó  s   rÅ   r#   rd   )r\   r)   r+   c                 C  s@   | j D ]4}t||ƒ|krt| |¡ƒ}|dkr2dn|  S qd S )Nr;   Ú )Z_initialpathsr   r`   Úrelative_to)r\   r)   Zinitial_pathÚrelr3   r3   r4   Ú_check_initialpaths_for_relpath"  s
    
r×   c                      sZ   e Zd ZdZdddddddd	dd
dœ	‡ fdd„Zedddœddddœ‡ fdd„ƒZ‡  ZS )ÚFSCollectorz%Base class for filesystem collectors.Nr'   zPath | Node | Noner&   rd   ra   rb   rc   re   )	r*   Úpath_or_parentr)   r=   rZ   r[   r\   rf   r+   c	           
        sN  |r@t |tƒr&|d kst‚tt|ƒ}nt |tƒr@|d ks<t‚|}tt| ƒ||d�}|d kr®|j}|d k	r®|j	|kr®z| 
|j	¡}	W n tk
r–   Y n
X t|	ƒ}| tjt¡}|| _	|d krÎ|d k	sÈt‚|j}|d k�r2zt| j	 
|jj¡ƒ}W n  tk
�r   t||ƒ}Y nX |�r2tjtk�r2| tjt¡}tƒ j||||||d� d S )Nrg   )r=   rZ   r[   r\   rf   r)   )rw   r7   r2   r   rØ   r   r5   rh   r=   r)   rÕ   rx   r`   Úreplacer¶   ÚsepÚSEPr\   r[   Zrootpathr×   rO   rF   )
rm   r*   rÙ   r)   r=   rZ   r[   r\   rf   rÖ   rT   r3   r4   rF   -  sH    


úzFSCollector.__init__)r*   r)   r"   )r*   r)   r+   c                  s   t ƒ jf |||dœ|—ŽS )zThe public constructor.)rZ   r*   r)   )rO   rn   )r@   rZ   r*   r)   rB   rT   r3   r4   rn   c  s    
zFSCollector.from_parent)NNNNNNNN)r1   r?   rW   rX   rF   r¿   rn   rY   r3   r3   rT   r4   rØ   *  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Æ   r3   r3   r3   r4   rÝ   p  s   rÝ   c                   @  s   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Æ   r3   r3   r3   r4   rÞ   w  s   rÞ   c                      sˆ   e Zd ZdZdZddddddœ‡ fdd	„Zdd
œdd„Zejdd
œdd„ƒZ	dddddœdd„Z
dd
œdd„Zedd
œdd„ƒZ‡  ZS )ÚItemz�Base class of all test invocation items.

    Note that for a single function there might be multiple test invocation items.
    Nrb   rc   rd   re   )r[   r\   rf   r+   c                   s6   t ƒ j||f|||dœ|—Ž g | _g | _|  ¡  d S )N)r[   r\   rf   )rO   rF   Ú_report_sectionsZuser_propertiesÚ-_check_item_and_collector_diamond_inheritance)rm   r=   rZ   r[   r\   rf   rB   rT   r3   r4   rF   ‘  s    þûúzItem.__init__r:   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Å   r1   )rH   Úbaser3   r3   r4   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/)	rh   rQ   ÚsetattrÚjoinÚ	__bases__r.   r/   r1   r!   )rm   r@   Ú	attr_nameÚproblemsr3   r3   r4   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È   ro   r3   r3   r4   ÚruntestË  s    zItem.runtestr`   )Ú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‚   )rm   rê   rë   rì   r3   r3   r4   Úadd_report_sectionÕ  s    zItem.add_report_sectionz.tuple[os.PathLike[str] | str, int | None, str]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Í   ro   r3   r3   r4   Ú
reportinfoæ  s    zItem.reportinfoztuple[str, int | None, str]c                 C  sF   |   ¡ }t|d ƒ}| j |¡}t|d ƒtks4t‚||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¬   rM   )rî   r   r\   Z_node_location_to_relpathrh   r`   r2   )rm   rÂ   r)   Z	relfspathr3   r3   r4   rÂ   ó  s
    zItem.location)NNNN)r1   r?   rW   rX   ZnextitemrF   rá   rÒ   rÓ   ré   rí   rî   r   rÂ   rY   r3   r3   rT   r4   rß   ‰  s       ú	rß   )KÚ
__future__r   rÒ   Ú	functoolsr   Úinspectr   r¶   Úpathlibr   Útypingr   r   r   r	   r
   r   r   r   r   r   r.   ZpluggyZ_pytest._codeZ_pytestr   Z_pytest._code.coder   r   r   r   Z_pytest.compatr   Z_pytest.configr   r   Z_pytest.config.compatr   Z_pytest.deprecatedr   Z_pytest.mark.structuresr   r   r   Z_pytest.outcomesr   Z_pytest.pathlibr   r   Z_pytest.stashr    Z_pytest.warning_typesr!   Útyping_extensionsr"   Z_pytest.mainr#   rÜ   Ú__file__rZ   rÐ   r%   r5   r6   ÚABCMetar9   ÚABCr7   ry   rÅ   r×   rØ   rÝ   rÞ   rß   r3   r3   r3   r4   Ú<module>   sp   ,  b/F