
    F-Ph9                       d 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ZddlZddlZddlZddlZddl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Zddl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+m0Z0 ddl1m2Z2 ddl1m3Z3 ddl4m5Z5 dd l4m6Z6 dd!l7m8Z8 erdd"l9m:Z: dd#l;m<Z< d^d(Z=d_d+Z>d`d1Z?dad2Z@dbd6ZAdcd7ZBddd9ZCded;ZDdfd>ZEdgdBZFdhdEZG G dF dG          ZH G dH dIeI          ZJ G dJ dKeK          ZLejM         G dL dMeNeeOf                               ZPe G dN dOejQ                              ZRe G dP d4ejS                              ZTdidSZU ejM        dTU           G dV dW                      ZVdXdYdjd]ZWdS )kzHCore implementation of the testing process: init, session, runtest loop.    )annotationsN)Callable)Iterable)Iterator)Sequence)Set)Path)final)Literal)overload)TYPE_CHECKING)nodes)Config)directory_arg)ExitCode)hookimpl)PytestPluginManager)
UsageError)Parser)PathAwareHookProxy)exitabsolutepath)bestrelpath
fnmatch_ex)safe_exists)scandir)CollectReport)
TestReport)collect_one_node)
SetupState)PytestWarning)Self)FixtureManagerparserr   returnNonec           
        |                      dd          }|                    dddddd	           |                    d
ddt          ddd           |                    ddd           |                    ddd           |                    ddd           |                      d          }|                    dddd           |                     ddd            |                      d!d"          }|                    d#d$d%dd&           |                    d'dd(           |                    d)dd*d+,           |                    d-dd*d.,           |                    d/dd0d1,           |                    d2d3d d4t          j        t          d25          d67           |                    d8dd9d:d;<           |                    d=d>dd?d:d@<           |                    dAddBd:dC<           |                    dDdd:dEdFG           |                    dHdIg dJdKdLM           |                     dNdOdPg dQR           |                     dSdTdPg R           |                     dUdVdWdXR           |                     dYdWd:dZ[           |                      d\d]          }|                    d^d_d`t          dadbc           |                    ddddedfg           |                    dhdid t          d4djk           d S )lNgeneralzRunning and selection optionsz-xz--exitfirststore_constmaxfail   z,Exit instantly on first error or failed test)actiondestconsthelpz	--maxfailnumstorer   z'Exit after first num failures or errors)metavarr.   typer/   defaultr1   z--strict-config
store_truezbAny warnings encountered while parsing the `pytest` section of the configuration file raise errors)r.   r1   z--strict-markerszVMarkers not registered in the `markers` section of the configuration file raise errorsz--strictz&(Deprecated) alias to --strict-markerszpytest-warningsz-Wz--pythonwarningsappendz<Set which warnings to report, see -W option of Python itselffilterwarningslinelistz_Each line specifies a pattern for warnings.filterwarnings. Processed after -W/--pythonwarnings.)r5   r1   collect
collectionz--collectonlyz--collect-onlyz--coz&Only collect tests, don't execute themz--pyargsz1Try to interpret all arguments as Python packagesz--ignorepathz-Ignore path during collection (multi-allowed))r.   r4   r1   z--ignore-globz5Ignore path pattern during collection (multi-allowed)z
--deselectnodeid_prefixzDDeselect item (via node id prefix) during collection (multi-allowed)z--confcutdir
confcutdirdir)optnamez1Only load conftest.py's relative to specified dir)r/   r6   r4   r5   r1   z--noconftest
noconftestFz Don't load any conftest.py files)r.   r/   r6   r1   z--keepduplicatesz--keep-duplicateskeepduplicateszKeep duplicate testsz--collect-in-virtualenvcollect_in_virtualenvz2Don't ignore tests in a local virtualenv directoryz--continue-on-collection-errorscontinue_on_collection_errorsz4Force test execution even if collection errors occur)r.   r6   r/   r1   z--import-modeprepend)rF   r8   	importlib
importmodez\Prepend/append to sys.path when importing test modules and conftest files. Default: prepend.)r6   choicesr/   r1   norecursedirsz)Directory patterns to avoid for recursionargs)	z*.eggz.*_darcsbuildCVSdistnode_modulesvenvz{arch})r5   r6   	testpathszZDirectories to search for tests when no files or directories are given on the command linecollect_imported_testsz@Whether to collect tests in imported modules outside `testpaths`boolTconsider_namespace_packageszEConsider namespace packages when resolving module names during import)r5   r6   r1   debugconfigz(test session debugging and configurationz-cz--config-fileFILEinifilenamezcLoad configuration from `FILE` instead of trying to locate one of the implicit configuration files.)r4   r5   r/   r1   z	--rootdirrootdirzDefine root directory for tests. Can be relative path: 'root_dir', './root_dir', 'root_dir/another_dir/'; absolute path: '/home/user/root_dir'; path with variables: '$HOME/root_dir'.)r.   r/   r1   z
--basetempbasetempz^Base temporary directory for this test run. (Warning: this directory is removed if it exists.))r/   r6   r5   r4   r1   )
getgroup
_addoption	addoptionintaddini	functoolspartialr   strvalidate_basetemp)r&   groups     L/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/_pytest/main.pypytest_addoptionrf   8   s   OOI'FGGE	;     
OO6     
OO*     
OO     
OO5     OO-..E	OOK	     MM/     OOI|44E	OO5     
OO@    
 
OO<	     
OOD	     
OOS	     
OO}nEEE@     
OO/     
OO#     
OO!$A     
OO),C     
OO222#     MM3

 

 

	      MM	     MM J	     MM%T	     OOM+UVVE	(     
OO	     
OOA  
 
 
 
 
    r=   rb   c                   d}| st          j        |          dd} |t          j                    t          |                                                     rt          j        |           |t          j                                                    t          |                                                     rt          j        |          | S )	NzWbasetemp must not be empty, the current working directory or any parent directory of itbaser	   queryr'   rT   c                $    | |k    rdS || j         v S )z,Return whether query is an ancestor of base.T)parents)ri   rj   s     re   is_ancestorz&validate_basetemp.<locals>.is_ancestor  s    5==4$$rg   )ri   r	   rj   r	   r'   rT   )argparseArgumentTypeErrorr	   cwdabsoluteresolve)r=   msgrm   s      re   rc   rc      s    
cC  .(---% % % % {48::tDzz224455 .(--- {48::%%''d););)=)=>> .(---Krg   configr   doit2Callable[[Config, Session], int | ExitCode | None]int | ExitCodec           	     $   t                               |           }t          j        |_        d}	 	 |                                  d}| j                            |           d} || |          pd|_        n# t          $ r t          j	        |_         t          $ r t          j        |_        Y nt          t          j        f$ r t          j        j                                        }t          j        }t)          |j        t          j                  rR|j        j        |j        j        }|dk     r4t.          j                            |j         d|j        j         d           | j                            |           ||_        Y nt:          $ r t          j        |_        t          j        j                                        }	 |                     || j                    t)          |j        tB                    rt.          j                            d	           nf# t          j        $ rT}|j        |j        |_        t.          j                            tE          |          j#         d| d           Y d}~nd}~ww xY wY nw xY wd}tI          j%        |j&                   |dk    r	 | j        '                    ||j        
           nf# t          j        $ rT}|j        |j        |_        t.          j                            tE          |          j#         d| d           Y d}~nd}~ww xY w| (                                 n# d}tI          j%        |j&                   |dk    r	 | j        '                    ||j        
           nf# t          j        $ rT}|j        |j        |_        t.          j                            tE          |          j#         d| d           Y d}~nd}~ww xY w| (                                 w xY w|j        S )zSkeleton command line program.r   r-   session   Nz: 
)excinfoz(mainloop: caught unexpected SystemExit!
)rz   
exitstatus))Sessionfrom_configr   OKr~   _do_configurehookpytest_sessionstartr   USAGE_ERRORFailedTESTS_FAILEDKeyboardInterruptr   	Exception_pytest_codeExceptionInfofrom_currentINTERRUPTED
isinstancevalue
returncodesysstderrwritetypenamers   pytest_keyboard_interruptBaseExceptionINTERNAL_ERRORnotify_exceptionoption
SystemExitr5   __name__oschdir	startpathpytest_sessionfinish_ensure_unconfigure)rt   ru   rz   	initstater}   r~   excs          re   wrap_sessionr     sc    !!&))G!GI0% 	R  """IK++G+<<<I!%fg!6!6!;!G 	 	 	!)!5G 	7 	7 	7!)!6G!4>2 		, 		, 		,m1>>@@G)1)=J'-88 S=+7!(!9Jq==J$$(8%Q%QGM<M%Q%Q%QRRRK11'1BBB!+G 	R 	R 	R!)!8Gm1>>@@GR''??? gmZ88 RJ$$%PQQQ > C C C>-),G&
  DII$6!A!A#!A!A!ABBBBBBBBC	R 
"###>>C00#0B 1     > C C C>-),G&
  DII$6!A!A#!A!A!ABBBBBBBBC 	""$$$$ 
"###>>C00#0B 1     > C C C>-),G&
  DII$6!A!A#!A!A!ABBBBBBBBC 	""$$$$s   AA8 6M 86J.M 1CJM 
=JH#:JJ ,A
I;6J;J  JM JM +!K L0A
L++L0"P+!NPO0A
O+&P+O00Pc                ,    t          | t                    S N)r   _mainrt   s    re   pytest_cmdline_mainr   O  s    &&&rg   rz   r   int | ExitCode | Nonec                    | j                             |           | j                             |           |j        rt          j        S |j        dk    rt          j        S dS )z[Default command line protocol for initialization, session,
    running tests and reporting.ry   r   N)r   pytest_collectionpytest_runtestlooptestsfailedr   r   testscollectedNO_TESTS_COLLECTED)rt   rz   s     re   r   r   S  sf     K!!'!222
K""7"333 +$$		1	$	$**4rg   c                .    |                                   d S r   )perform_collectry   s    re   r   r   `  s    rg   rT   c                
   | j         r>| j        j        j        s-|                     | j          d| j         dk    rdnd d          | j        j        j        rdS t          | j                  D ]\  }}|dz   t          | j                  k     r| j        |dz            nd }|j        j	        
                    ||           | j        r|                     | j                  | j        r|                     | j                  dS )Nz errorr-   s z during collectionT)itemnextitem)r   rt   r   rE   Interruptedcollectonly	enumerateitemslenr   pytest_runtest_protocol
shouldfailr   
shouldstop)rz   ir   r   s       re   r   r   d  s'    
7>#8#V 
!!"ee1D1I1I##reee
 
 	
 ~( tW]++ : :4+,q53w}3E3E+E+E7=Q''400dX0NNN 	5..!3444 	:%%g&8999	:4rg   r	   c                    	 |                      d                                          p'|                      dd                                          S # t          $ r Y dS w xY w)a  Attempt to detect if ``path`` is the root of a Virtual Environment by
    checking for the existence of the pyvenv.cfg file.

    [https://peps.python.org/pep-0405/]

    For regression protection we also check for conda environments that do not include pyenv.cfg yet --
    https://github.com/conda/conda/issues/13337 is the conda issue tracking adding pyenv.cfg.

    Checking for the `conda-meta/history` file per https://github.com/pytest-dev/pytest/issues/12652#issuecomment-2246336902.

    z
pyvenv.cfgz
conda-metahistoryF)joinpathis_fileOSErrorr=   s    re   _in_venvr   w  sn    MM,''//11 @}}\955==??	
    uus   AA 
AAcollection_pathbool | Nonec                     j         dk    rdS |                    d j                  }|pg }|                    d          }|r|                    d |D                         |v rdS |                    d j                  }|pg }|                    d          }|r|                    d	 |D                        t           fd
|D                       rdS |                    d          }|st                     rdS                                  r2|                    d          }t           fd|D                       rdS d S )N__pycache__Tcollect_ignorer   ignorec              3  4   K   | ]}t          |          V  d S r   r   .0xs     re   	<genexpr>z(pytest_ignore_collect.<locals>.<genexpr>  s(      @@LOO@@@@@@rg   collect_ignore_globignore_globc              3  4   K   | ]}t          |          V  d S r   r   r   s     re   r   z(pytest_ignore_collect.<locals>.<genexpr>  s(      DDLOODDDDDDrg   c              3  v   K   | ]3}t          j         t                    t          |                    V  4d S r   )fnmatchrb   )r   globr   s     re   r   z(pytest_ignore_collect.<locals>.<genexpr>  s=      
U
U7?3//T;;
U
U
U
U
U
Urg   rD   rJ   c              3  8   K   | ]}t          |          V  d S r   r   )r   patr   s     re   r   z(pytest_ignore_collect.<locals>.<genexpr>  s-      MMCz#//MMMMMMrg   )	name_getconftest_pathlistparent	getoptionextendanyr   is_dirgetini)r   rt   ignore_paths
excludeoptignore_globsexcludegloboptallow_in_venvnorecursepatternss   `       re   pytest_ignore_collectr     s   },,t//5 0  L  %2L!!(++J A@@Z@@@@@@,&&t//O$: 0  L  %2L%%m44N EDD^DDDDDD

U
U
U
U
U
U
UUU t$$%<==M Xo66 t "MM/::MMMM;LMMMMM 	44rg   r   nodes.Collectornodes.Collector | Nonec                :    t                               ||           S )Nr   )Dirfrom_parentr=   r   s     re   pytest_collect_directoryr     s     ??6?---rg   r   list[nodes.Item]c                >   t          |                    d          pg           }|sd S g }g }| D ]G}|j                            |          r|                    |           2|                    |           H|r$|j                            |           || d d <   d S d S )Ndeselect)r   )tupler   nodeid
startswithr8   r   pytest_deselected)r   rt   deselect_prefixes	remaining
deselectedcolitems         re   pytest_collection_modifyitemsr     s    f..z::@bAA IJ & &>$$%677 	&g&&&&W%%%% %%J%777aaa rg   c                      e Zd ZddZddZdS )FSHookProxypmr   remove_modsAbstractSet[object]r'   r(   c                "    || _         || _        d S r   )r   r   )selfr   r   s      re   __init__zFSHookProxy.__init__  s    
 &rg   r   rb   pluggy.HookCallerc                \    | j                             || j                  }|| j        |<   |S )N)remove_plugins)r   subset_hook_callerr   __dict__)r  r   r   s      re   __getattr__zFSHookProxy.__getattr__  s0    G&&tD<L&MMdrg   N)r   r   r   r  r'   r(   )r   rb   r'   r  )r   
__module____qualname__r  r
   rg   re   r   r     s<        ' ' ' '     rg   r   c                      e Zd ZdZdZdS )r   z*Signals that the test run was interrupted.builtinsNr   r  r  __doc__r  rg   re   r   r     s        44JJJrg   r   c                      e Zd ZdZdS )r   z"Signals a stop as failed test run.Nr  r  rg   re   r   r     s        ,,,,rg   r   c                  &    e Zd ZU dZded<   ddZdS )	_bestrelpath_cacher   r	   r=   r'   rb   c                :    t          | j        |          }|| |<   |S r   )r   r=   )r  r=   rs      re   __missing__z_bestrelpath_cache.__missing__  s!    	4((T
rg   N)r=   r	   r'   rb   )r   r  r  	__slots____annotations__r  r  rg   re   r  r    s8         IJJJ     rg   r  c                  <     e Zd ZdZed fd            Zdd
Z xZS )r   a  Collector of files in a file system directory.

    .. versionadded:: 8.0

    .. note::

        Python directories with an `__init__.py` file are instead collected by
        :class:`~pytest.Package` by default. Both are :class:`~pytest.Directory`
        collectors.
    r   r   r=   r	   r'   r$   c               J    t                                          ||          S )zThe public constructor.

        :param parent: The parent collector of this Dir.
        :param path: The directory's path.
        :type path: pathlib.Path
        )r   r=   )superr   )clsr   r=   	__class__s      re   r   zDir.from_parent  s"     ww""&t"<<<rg   &Iterable[nodes.Item | nodes.Collector]c              #  :  K   | j         }| j        }t          | j                  D ]}|                                rft          |j                  }| j                            |d          s|                    ||          r^|	                    ||           }||V  ||
                                ret          |j                  }| j                            |          s|                    ||          r|                    ||           }|E d {V  d S )NTwith_parents)r   rt   r   	file_pathr   )rt   ihookr   r=   r   r	   rz   
isinitpathr   r   r   pytest_collect_file)r  rt   r%  direntryr=   colcolss          re   r;   zDir.collect  sA      
	** 	  	 H    HM**|..t$.GG !224PV2WW ! 44$t4LL?III!!##  HM**|..t44 !224PV2WW ! 0040MM!	  	 rg   )r   r   r=   r	   r'   r$   )r'   r  )r   r  r  r  classmethodr   r;   __classcell__r  s   @re   r   r     sg        	 	 = = = = = [=               rg   r   c                      e Zd ZU dZeZeZded<   ded<   ded<   dD fdZedEd            Z	dFdZ
edGd            Zej        dHd            ZedGd            Zej        dHd            ZedId            ZdJdZ ed          dKd            Z ed          dLd            ZeZd d!dMd&ZdNd*ZdOd.Ze	 dPdQd5            Ze	 dPdRd7            Z	 dSdRd9Z	 dTdUd>ZdVd@ZdWdCZ xZS )Xr   zoThe root of the collection tree.

    ``Session`` collects the initial paths given as arguments to pytest.
    r"   _setupstater%   _fixturemanagerrw   r~   rt   r   r'   r(   c           	        t                                          d|j        d d || d           d| _        d| _        d| _        d| _        |j        j        	                    d          | _        t                      | _        t                      | _        g | _        g | _        i | _        g | _        t#          |j                  | _        | j        j                            | d           d S )Nr   )r   r=   fspathr   rt   rz   r   r   Fr<   rz   )r   )r  r  rootpathr   r   _shouldstop_shouldfailtracerootget	frozenset_initialpaths_initialpaths_with_parents	_notfound_initial_parts_collection_cacher   r  _bestrelpathcachert   pluginmanagerregister)r  rt   r  s     re   r  zSession.__init__2  s     	 	
 	
 	
 ',',\&**<88
.7kk;D;;'FH8:GI')
2DV_2U2U!**4i*@@@@@rg   c                2    |                      |          }|S )Nr   )_create)r  rt   rz   s      re   r   zSession.from_configL  s    ;;f;55rg   rb   c           	     v    d| j         j         d| j         d| j         d| j         d	t          | dd          z  S )N< z exitstatus=%r testsfailed=z testscollected=>r~   z<UNSET>)r  r   r   r   r   getattrr  s    re   __repr__zSession.__repr__Q  sh    5' 5 5$) 5 5+5 5 #15 5 5 D,	223 	3rg   
bool | strc                    | j         S r   )r4  rI  s    re   r   zSession.shouldstopY      rg   r   c                t    |du r,| j         r%t          j        t          d          d           d S || _         d S )NFzCsession.shouldstop cannot be unset after it has been set; ignoring.r{   
stacklevel)r4  warningswarnr#   r  r   s     re   r   zSession.shouldstop]  W     E>>d.>MY  	    F rg   c                    | j         S r   )r5  rI  s    re   r   zSession.shouldfailk  rM  rg   c                t    |du r,| j         r%t          j        t          d          d           d S || _         d S )NFzCsession.shouldfail cannot be unset after it has been set; ignoring.r{   rO  )r5  rQ  rR  r#   rS  s     re   r   zSession.shouldfailo  rT  rg   r	   c                $    | j         j        j        S )zQThe path from which pytest was invoked.

        .. versionadded:: 7.0.0
        )rt   invocation_paramsr@   rI  s    re   r   zSession.startpath}  s     {,00rg   	node_pathc                    | j         |         S r   )r?  )r  rY  s     re   _node_location_to_relpathz!Session._node_location_to_relpath  s    %i00rg   T)tryfirstc                    | j         r|                     | j                   | j        r|                     | j                  d S r   )r   r   r   r   rI  s    re   pytest_collectstartzSession.pytest_collectstart  sJ    ? 	/++do...? 	4""4?333	4 	4rg   reportTestReport | CollectReportc                    |j         rYt          |d          sK| xj        dz  c_        | j                            d          }|r!| j        |k    rd| j         d| _        d S d S d S d S d S )Nwasxfailr-   r,   zstopping after z	 failures)failedhasattrr   rt   getvaluer   )r  r_  r,   s      re   pytest_runtest_logreportz Session.pytest_runtest_logreport  s    = 	P!<!< 	P!k**955G P4+w66"OD4D"O"O"O		P 	P 	P 	PP P66rg   Fr!  r=   str | os.PathLike[str]r"  rT   c               v    t          |t                    r|nt          |          }|r	|| j        v S || j        v S )a>  Is path an initial path?

        An initial path is a path explicitly given to pytest on the command
        line.

        :param with_parents:
            If set, also return True if the path is a parent of an initial path.

        .. versionchanged:: 8.0
            Added the ``with_parents`` parameter.
        )r   r	   r;  r:  )r  r=   r"  path_s       re   r&  zSession.isinitpath  sF    $ #4..>DJJ 	/D;;;D...rg   r2  os.PathLike[str]pluggy.HookRelayc                    t          |t                    r|nt          |          }| j        j        }|                    |          }|j                            |          }|rt          t          ||                    }n| j        j	        }|S r   )
r   r	   rt   r@  _getconftestmodules_conftest_plugins
differencer   r   r   )r  r2  r=   r   my_conftestmodulesr   proxys          re   gethookproxyzSession.gethookproxy  s    #FD11CvvtF||[&  33D99*556HII 	%&{2{'C'CDDEE K$Erg   
path_cache%dict[Path, Sequence[nodes.Collector]]Sequence[nodes.Collector]c                H   ||v r||         S |                                 r9|                     |j                  }|                    ||           }||fnd}nC|                                r-|                     |          }|                    ||           }nd}|||<   |S )zCreate a Collector for the given path.

        `path_cache` makes it so the same Collectors are returned for the same
        path.
        r   Nr  r#  )r   rr  r   r   r   r'  )r  r=   rs  r%  r)  r*  s         re   _collect_pathzSession._collect_path  s     :d##;;== 	%%dk22E*/*H*H$ +I + +C 9<sffRDD\\^^ 	%%d++E,,tD,IIDD D
4rg   .rK   Sequence[str] | NonegenitemsLiteral[True]Sequence[nodes.Item]c                    d S r   r  r  rK   ry  s      re   r   zSession.perform_collect  s	      #srg   &Sequence[nodes.Item | nodes.Collector]c                    d S r   r  r}  s      re   r   zSession.perform_collect  s	     25rg   Nc                   || j         j        }|                     d| |           | j        j        xj        dz  c_        | j         j        }g | _        g | _        i | _        g | _	        | j	        }	 g }g }|D ]}t          | j         j        j        || j         j        j                  }| j                            |           |                    |j                   |                    |j                   |                    |j        j                   t'          |          | _        t'          |          | _        t-          |           }	| j                            |	           | j        j        xj        dz  c_        | j        rOg }
| j        D ]<\  }}|r|
                    d| d|d           $|
                    d	|            =t3          |
 |s|	j        }n>|	j        r7|	j        D ]/}| j	                            |                     |                     0| j         j                                         |                    | | j         |
           g | _        g | _        i | _        |                     |            n0# g | _        g | _        i | _        |                     |            w xY w|rtC          |          | _"        |S )a  Perform the collection phase for this session.

        This is called by the default :hook:`pytest_collection` hook
        implementation; see the documentation of this hook for more details.
        For testing purposes, it may also be called directly on a fresh
        ``Session``.

        This function normally recursively expands any collectors collected
        from the session to their items, and only items are returned. For
        testing purposes, this may be suppressed by passing ``genitems=False``,
        in which case the return value contains these collectors unexpanded,
        and ``session.items`` is empty.
        Nr   r-   	as_pypathr_  znot found: z
(no match in any of )zfound no collectors for )rz   rt   r   ry   )#rt   rK   r6  r7  indentr   r<  r=  r>  r   resolve_collection_argumentrX  r@   r   pyargsr8   r=   r   rl   r9  r:  r;  r!   r%  pytest_collectreportr   resultpassedry  r@  check_pendingr   pytest_collection_finishr   r   )r  rK   ry  r   r   initialpathsinitialpaths_with_parentsargcollection_argumentreperrors
collectorsnodes                re   r   zSession.perform_collect  s%     <;#D

$dD111
!#{ !#
8<
.	8')L46% 	S 	S&AK15"k07' ' '#
 #**+>???##$7$<===)001D1IJJJ)001D1I1QRRRR!*<!8!8D.78Q.R.RD+"4((CJ++3+777JO""a'""~ 
*'+~ H HOC! HT#TTZTTT    &F&F&FGGGG &)) ?
: ? #
 ? ?
))$--*=*=>>>>K%33555..T[ /     DN"$D%'D"))$)7777  DN"$D%'D"))$)7777 	-"%e**Ds   0G+J -J4r  r   handle_dupestuple[CollectReport, bool]c                t    || j         v r|r| j         |         }|dfS t          |          }|| j         |<   |dfS )NTF)r>  r!   )r  r  r  r  s       re   _collect_one_nodezSession._collect_one_node>  sR    
 4)))l)(.C9"4((C+.D"4(:rg   &Iterator[nodes.Item | nodes.Collector]c              #    K   i }| j         j        }| j        D ]}|                     d|           | j        j        xj        dz  c_        |j        }|j        }|j        }|	                                r|rJ d||f            |g}|8|j
        D ]/}|                    |          s n|                    d|           0nm|                    d          }	t          |j
        d          D ]B\  }
}|
t          |	          k    s|j        |	|
          k    r n|                    d|           Cd}g }| g ||fg}|re|                                \  }}|s|V  d}#t%          |t&          j                  s>t%          |t*                    r:t%          |d         t,                    sJ |                    |d         |          }nt          |          dk    o4t%          |d         t,                    o|d                                          }|                     ||          \  }}|s"|j        s|j                            |	           |j        s|j        }d}t=          |          D ]}t%          |d         t,                    r|j        |d         k    }t>          j         d
k    rz|sxtB          j        "                    |j        |d                   }|oJtB          j        #                    |j                  tB          j        #                    |d                   k    }n;|j$        |d         k    p)|j$                            d          d         |d         k    }|r!|%                    ||dd          f           d}|s|%                    |           |e|sBd&                    tO          |          g|R           }| j(        %                    ||f           | j        j        xj        dz  c_        d S )Nzprocessing argumentr-   zinvalid arg r   .r{   FTr  win32[::))rt   r@  r=  r6  r7  r  r=   partsmodule_namer   rl   _is_in_confcutdirinsertsplitr   r   stempopr   r   	Collectorr   r	   rw  r   r  r  r%  r  r  reversedr   platformr   samefileislinkr   r8   joinrb   r<  )r  rs  r   r  argpathnamesr  pathsr=   module_name_partsr   any_matched_in_initial_partnotfound_collectorswork	matchnode
matchpartssubnodesr  r  	duplicateany_matched_in_collectorr  is_match	same_file
report_args                            re   r;   zSession.collectK  s      =?
[&#'#6 o	( o	(JJ,.ABBBJO""a'"").G'-E-9K ~~ F EE"E'51A"E"EEEEIE "#O * *D//55 LLD)))) %0$5$5c$:$:!(!<< * *GAt301111TYBSUVTVBW5W5WLLD)))) +0'"$'''(QD  D:(,

%	: " #OOO26/ ")U_==  i11 *%jmT:::::(66z!}jQQHH
 J1, 4&z!}d;;4&qM1133$L
 &*%;%;I|%T%TNC$ ISZ I "<<C<HHH: ! "zH ,1($X.. 8 8D!*Q-66 #'9
1#=<72282 )+(8(8JqM(R(RI (1 ( "ty 9 9#%7>>*Q-#@#@!A % !IA6 H#ys33A6*Q-G !   8T:abb>$:;;;370/ :'..y999I  D:L / I!YYG'=u'='=>>
%%z3F&GHHHJO""a'"""_o	( o	(rg   nodes.Item | nodes.CollectorIterator[nodes.Item]c              #  &  K   |                      d|           t          |t          j                  r!|j                            |           |V  d S t          |t          j                  sJ | j                            d          }|ot          |t          j	                   }| 
                    ||          \  }}|r|sd S |j        r%|j        D ]}|                     |          E d {V  |s|j                            |           d S d S )Nry  )r   rC   r  )r6  r   r   Itemr%  pytest_itemcollectedr  rt   r   Filer  r  r  ry  r  )r  r  rC   r  r  r  subnodes          re   ry  zSession.genitems  s;     

:t$$$dEJ'' 	<J+++666JJJJJdEO44444![223CDDN . O:dEJ3O3OPL!33D,GGNC  z 6"z 6 6G#}}W5555555555 <
//s/;;;;;< <rg   )rt   r   r'   r(   )rt   r   r'   r   )r'   rb   )r'   rK  )r   rK  r'   r(   )r'   r	   )rY  r	   r'   rb   )r'   r(   )r_  r`  r'   r(   )r=   rg  r"  rT   r'   rT   )r2  rj  r'   rk  )r=   r	   rs  rt  r'   ru  )..)rK   rx  ry  rz  r'   r{  )rK   rx  ry  rT   r'   r~  )NT)T)r  r   r  rT   r'   r  )r'   r  )r  r  r'   r  )r   r  r  r  r   r   r  r  r+  r   rJ  propertyr   setterr   r   r[  r   r^  rf  r  r&  rr  rw  r   r   r  r;   ry  r,  r-  s   @re   r   r   #  s         
 KF####A A A A A A4    [3 3 3 3       X  ! ! ! !       X  ! ! ! ! 1 1 1 X11 1 1 1 Xt4 4 4 4 XtP P P P 4 #	/ / / / / /0   "   > JM# # # # X# AD5 5 5 5 X5
 CGP P P P Pj "    w( w( w( w(r< < < < < < < <rg   r  
str | Nonec                   	 t           j                            |           }n# t          t          t
          f$ r Y dS w xY w||j        |j        dk    rdS |j        r$t          j	        
                    |j                  S |j        S )zaSearch sys.path for the given a dotted module name, and return its file
    system path if found.N	namespace)rG   util	find_specAttributeErrorImportError
ValueErrororiginsubmodule_search_locationsr   r=   dirname)r  specs     re   search_pypathr    s    ~''44 K4   tt|t{*dk[.H.Ht		( wt{+++{s   " ==T)frozenc                  2    e Zd ZU dZded<   ded<   ded<   dS )	CollectionArgumentzA resolved collection argument.r	   r=   zSequence[str]r  r  r  N)r   r  r  r  r  r  rg   re   r  r    s9         ))JJJrg   r  Fr  invocation_pathr  r  c                  t          |                              d          \  }}}|                    d          ^}}|r|d          | | |d<   d}|rt          |          }	|	|}|	}| |z  }
t	          |
          }
t          |
          s)|rdnd}t          |                    |                    |r=|
                                r)|rdnd	}t          |                    |                    t          |
||
          S )a  Parse path arguments optionally containing selection parts and return (fspath, names).

    Command-line arguments can point to files and/or directories, and optionally contain
    parts for specific tests selection, for example:

        "pkg/tests/test_foo.py::TestClass::test_foo"

    This function ensures the path exists, and returns a resolved `CollectionArgument`:

        CollectionArgument(
            path=Path("/full/path/to/pkg/tests/test_foo.py"),
            parts=["TestClass", "test_foo"],
            module_name=None,
        )

    When as_pypath is True, expects that the command-line argument actually contains
    module paths instead of file-system paths:

        "pkg.tests.test_foo::TestClass::test_foo"

    In which case we search sys.path for a matching module, and then return the *path* to the
    found module, which may look like this:

        CollectionArgument(
            path=Path("/home/u/myvenv/lib/site-packages/pkg/tests/test_foo.py"),
            parts=["TestClass", "test_foo"],
            module_name="pkg.tests.test_foo",
        )

    If the path doesn't exist, raise UsageError.
    If the path is a directory and selection parts are present, raise UsageError.
    r  r  Nz9module or package not found: {arg} (missing __init__.py?)z"file or directory not found: {arg})r  z9package argument cannot contain :: selection parts: {arg}z;directory argument cannot contain :: selection parts: {arg})r=   r  r  )
rb   	partitionr  r  r   r   r   formatr   r  )r  r  r  ri   squacketreststrpathr  r  pyarg_strpathr2  rs   s               re   r  r    sT   F s88--c22D(Djj&&OGe 3Ry2(2D22b	K $%g..$!K#Gw&F&!!Fv . 6GG5 	
 ,,--- . . OGGN 	
 ,,---   rg   )r&   r   r'   r(   )r=   rb   r'   rb   )rt   r   ru   rv   r'   rw   )rt   r   r'   rw   )rt   r   rz   r   r'   r   )rz   r   r'   r(   )rz   r   r'   rT   )r=   r	   r'   rT   )r   r	   rt   r   r'   r   )r=   r	   r   r   r'   r   )r   r   rt   r   r'   r(   )r  rb   r'   r  )r  r	   r  rb   r  rT   r'   r  )Xr  
__future__r   rn   collections.abcr   r   r   r   r   AbstractSetdataclassesr   r`   rG   importlib.utilr   pathlibr	   r   typingr
   r   r   r   rQ  pluggyr   r   _pytest._code_pytest.configr   r   r   r   r   r   _pytest.config.argparsingr   _pytest.config.compatr   _pytest.outcomesr   _pytest.pathlibr   r   r   r   r   _pytest.reportsr   r    _pytest.runnerr!   r"   _pytest.warning_typesr#   typing_extensionsr$   _pytest.fixturesr%   rf   rc   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	dataclassdictrb   r  	Directoryr   r  r   r  r  r  r  rg   re   <module>r     s   N N " " " " " "  $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ . . . . . .                  				       



                                           ! ! ! ! ! ! ( ( ( ( ( ( # # # # # # # # # # # # . . . . . . % % % % % % , , , , , , 4 4 4 4 4 4 ! ! ! ! ! ! ( ( ( ( ( ( ' ' ' ' ' ' & & & & & & ' ' ' ' ' ' # # # # # # ) ) ) ) ) ) & & & & & & + + + + + + % % % % % % / / / / / /  0&&&&&&//////@ @ @ @F   28 8 8 8v' ' ' '
 
 
 
      &   *# # # #L. . . .   $           #   - - - - -Y - - -     dCi    0  0  0  0  0 %/ 0  0  0 f q< q< q< q< q<eo q< q< q<h   $ d###       $# ;@A A A A A A A Arg   