Ë
    æØjj§  ã                  óô  — 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*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< dGd%„Z=dHd&„Z>	 	 	 	 	 	 dId'„Z?dJd(„Z@dKd*„ZAdLd+„ZBdMd,„ZCdNd-„ZDdOd.„ZE	 	 	 	 	 	 dPd/„ZFdQd0„ZG G d1„ d2«      ZH G d3„ d4eI«      ZJ G d5„ d6eK«      ZLejš                   G d7„ d8eNeeOf   «      «       ZPe G d9„ d:ej¢                  «      «       ZRe G d;„ d)ej¦                  «      «       ZTd<d=œ	 	 	 	 	 dRd>„ZU ejš                  d?¬@«       G dA„ dB«      «       ZVd<d<dCœ	 	 	 	 	 	 	 	 	 	 	 dSdD„ZW	 	 	 	 	 	 dTdE„ZX	 	 	 	 dUdF„ZYy)VzHCore 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)ÚOverrideIniAction)ÚParser)Úexit©Úabsolutepath)Úbestrelpath©Ú
fnmatch_ex)Úsafe_exists)Úsamefile_nofollow)Úscandir)ÚCollectReport)Ú
TestReport)Úcollect_one_node)Ú
SetupState)ÚPytestWarning)ÚSelf)ÚFixtureManagerc           
     ó  — | j                  d«      }|j                  dddddd¬«       |j                  d	d
dt        ddd¬«       |j                  dt        ddd¬«       |j                  dt        ddd¬«       |j                  dt        ddd¬«       | j                  dddd ¬«       | j                  dddd ¬«       | j                  dddd¬«       | j                  d «      }|j                  d!d"d#d$¬%«       |j                  d&dt        d d
d'd(¬)«       | j                  d*d+d,¬-«       | j                  d'd(¬.«       | j                  d/d0«      }|j                  d1d2d3d4d5¬%«       |j                  d6d4d7¬%«       |j                  d8d#d9d:¬;«       |j                  d<d#d9d=¬;«       |j                  d>d#d?d@¬;«       |j                  dAdBd dCt        j                  t        dA¬D«      dE¬F«       |j                  dGd4dHddI¬J«       |j                  dKdLd4dMddN¬J«       |j                  dOd4dPddQ¬J«       |j                  dRd4ddSdT¬U«       |j                  dVdWg dX¢dYdZ¬[«       | j                  d\d]d^g d_¢¬«       | j                  d`dad^g ¬«       | j                  dbdcddd¬«       | j                  dedddf¬g«       | j                  dhdi«      }|j                  djdkdlt        dmdn¬o«       |j                  dpddqdr¬s«       |j                  dtdud t        dCdv¬w«       y )xNÚgeneralz-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-   Údefaultr/   z--strict-configÚstrict_configÚtruez Enables the strict_config option)r,   Ú
ini_optionÚ	ini_valuer/   z--strict-markersÚstrict_markersz!Enables the strict_markers optionz--strictÚstrictzEnables the strict optionzbAny warnings encountered while parsing the `pytest` section of the configuration file raise errorsÚbool)r3   r4   zVMarkers not registered in the `markers` section of the configuration file raise errorszrEnables all strictness options, currently: strict_config, strict_markers, strict_xfail, strict_parametrization_idsFzpytest-warningsz-Wz--pythonwarningsÚappendz<Set which warnings to report, see -W option of Python itself)r,   r/   z--max-warningsÚmax_warningszSExit with error if all tests pass but the number of warnings exceeds this threshold)r,   r3   r4   r2   r-   r/   ÚfilterwarningsÚlinelistz_Each line specifies a pattern for warnings.filterwarnings. Processed after -W/--pythonwarnings.)r3   r/   )r/   ÚcollectÚ
collectionz--collectonlyz--collect-onlyz--coÚ
store_truez&Only collect tests, don't execute themz--pyargsz1Try to interpret all arguments as Python packagesz--ignoreÚpathz-Ignore path during collection (multi-allowed))r,   r2   r/   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-   r4   r2   r3   r/   z--noconftestÚ
noconftestz Don't load any conftest.py files)r,   r-   r4   r/   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,   r4   r-   r/   z--import-modeÚprepend)rL   r<   Ú	importlibÚ
importmodez\Prepend/append to sys.path when importing test modules and conftest files. Default: prepend.)r4   Úchoicesr-   r/   Únorecursedirsz)Directory patterns to avoid for recursionÚargs)	z*.eggz.*Ú_darcsÚbuildÚCVSÚdistÚnode_modulesÚvenvz{arch}Ú	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`TÚconsider_namespace_packageszEConsider namespace packages when resolving module names during import)r3   r4   r/   Ú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.)r2   r3   r-   r/   z	--rootdirÚrootdirz¶Define 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-   r/   z
--basetempÚbasetempz^Base temporary directory for this test run. (Warning: this directory is removed if it exists.))r-   r4   r3   r2   r/   )ÚgetgroupÚ
_addoptionÚ	addoptionÚintr   ÚaddiniÚ	functoolsÚpartialr   ÚstrÚvalidate_basetemp)ÚparserÚgroups     úN/opt/eval-harness/bench_task/venv/lib/python3.12/site-packages/_pytest/main.pyÚpytest_addoptionrl   9   sC  € Ø�O‰O˜IÓ&€EØ	×ÑØØØØØØ;ð ô ð 
‡O�OØØØÜØØØ6ð ô ð 
‡O�OØÜ Ø"ØØ/ð ô ð 
‡O�OØÜ Ø#ØØ0ð ô ð 
‡O�OØÜ ØØØ(ð ô ð ‡M�MØð	*ààð ô ð ‡M�MØð	ààð ô ð ‡M�MØð	RàØð ô ð �O‰OÐ-Ó.€EØ	‡O�OØØØØKð	 ô ð 
‡O�OØØÜØØØØbð ô ð ‡M�MØØð/ð ô ð ‡M�MØØbð ô ð
 �O‰O˜I |Ó4€EØ	‡O�OØØØØØ5ð ô ð 
‡O�OØØØ@ð ô ð
 
‡O�OØØØØ<ð	 ô ð 
‡O�OØØØØDð	 ô ð 
‡O�OØØØØSð	 ô ð 
‡O�OØØØØÜ×Ñœ}°nÔEØ@ð ô ð 
‡O�OØØØØØ/ð ô ð 
‡O�OØØØØØØ#ð ô ð 
‡O�OØ!ØØ$ØØAð ô ð 
‡O�OØ)ØØØ,ØCð ô ð 
‡O�OØØÚ2Øð#ð ô ð ‡M�MØØ3Øò

ð	 ô ð  ‡M�MØð	àØð ô ð ‡M�MØ ØJØØð	 ô ð ‡M�MØ%ØØØTð	 ô ð �O‰O˜MÐ+UÓV€EØ	×ÑØØØÜØð(ð ô ð 
‡O�OØØØðð	 ô ð 
‡O�OØØØÜØðAð õ 
ó    c                óx  — d}| st        j                  |«      ‚dd„} |t        j                  «       t        | «      j	                  «       «      rt        j                  |«      ‚ |t        j                  «       j                  «       t        | «      j                  «       «      rt        j                  |«      ‚| S )NzWbasetemp must not be empty, the current working directory or any parent directory of itc                ó*   — | |k(  ry|| j                   v S )z,Return whether query is an ancestor of base.T)Úparents)ÚbaseÚquerys     rk   Úis_ancestorz&validate_basetemp.<locals>.is_ancestor,  s   € à�5Š=ØØ˜Ÿ™Ð$Ð$rm   )rq   r	   rr   r	   Úreturnr;   )ÚargparseÚArgumentTypeErrorr	   ÚcwdÚabsoluteÚresolve)rC   Úmsgrs   s      rk   rh   rh   $  s�   € à
c€Cñ Ü×(Ñ(¨Ó-Ð-ó%ñ ”4—8‘8“:œt D›z×2Ñ2Ó4Ô5Ü×(Ñ(¨Ó-Ð-ñ ”4—8‘8“:×%Ñ%Ó'¬¨d«×);Ñ);Ó)=Ô>Ü×(Ñ(¨Ó-Ð-à€Krm   c           	     ó	  — t         j                  | «      }t        j                  |_        d}	 	 | j                  «        d}| j                  j                  |¬«       d} || |«      xs d|_        d}tI        jJ                  |jL                  «       |dk\  r(	 | j                  jO                  ||j                  ¬
«       | jQ                  «        |j                  S # t        $ r t        j                  |_        ‚ t        $ r t        j                  |_        Y Œ¨t        t        j                  f$ r÷ t        j                   j"                  j%                  «       }t        j&                  }t)        |j*                  t        j                  «      rt|j*                  j,                  �|j*                  j,                  }|dk  rCt.        j0                  j3                  |j4                  › d|j*                  j6                  › d�«       | j                  j9                  |¬«       ||_        Y �Œ¶t:        $ �r t        j<                  |_        t        j                   j"                  j%                  «       }	 | j?                  || j@                  «       t)        |j*                  tB        «      r•t.        j0                  j3                  d	«       nu# t        j                  $ r_}|j,                  �|j,                  |_        t.        j0                  j3                  tE        |«      jF                  › d|› d�«       Y d}~nd}~ww xY wY �ŒËw xY w# t        j                  $ r`}|j,                  �|j,                  |_        t.        j0                  j3                  tE        |«      jF                  › d|› d�«       Y d}~�Œïd}~ww xY w# d}tI        jJ                  |jL                  «       |dk\  rž	 | j                  jO                  ||j                  ¬
«       nu# t        j                  $ r_}|j,                  �|j,                  |_        t.        j0                  j3                  tE        |«      jF                  › d|› d�«       Y d}~nd}~ww xY w| jQ                  «        w xY w)zSkeleton command line program.r   r+   ©Úsessioné   Nz: ú
)Úexcinfoz(mainloop: caught unexpected SystemExit!
)r}   Ú
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Útypenamerz   Úpytest_keyboard_interruptÚBaseExceptionÚINTERNAL_ERRORÚnotify_exceptionÚoptionÚ
SystemExitr3   Ú__name__ÚosÚchdirÚ	startpathÚpytest_sessionfinishÚ_ensure_unconfigure)ÚconfigÚdoitr}   Ú	initstater€   r�   Úexcs          rk   Úwrap_sessionr©   =  s˜  € ô ×!Ñ! &Ó)€GÜ!Ÿ™€GÔØ€Ið0%ð 	RØ× Ñ Ô"ØˆIØ�K‰K×+Ñ+°GÐ+Ô<ØˆIÙ!% f¨gÓ!6Ò!;¸!ˆGÔð> ˆÜ
�‰�×"Ñ"Ô#Ø˜Š>ðCØ—‘×0Ñ0Ø#°×0BÑ0Bð 1ô ð 	×"Ñ"Ô$Ø×ÑÐøôU ò 	Ü!)×!5Ñ!5ˆGÔØÜò 	7Ü!)×!6Ñ!6ˆGÖÜ!¤4§>¡>Ð2ò 		,Ü—m‘m×1Ñ1×>Ñ>Ó@ˆGÜ)1×)=Ñ)=ˆJÜ˜'Ÿ-™-¬¯©Ô8Ø—=‘=×+Ñ+Ð7Ø!(§¡×!9Ñ!9�JØ˜q’=Ü—J‘J×$Ñ$¨×(8Ñ(8Ð'9¸¸G¿M¹M×<MÑ<MÐ;NÈbÐ%QÔRØ�K‰K×1Ñ1¸'Ð1ÔBØ!+ˆG×Üó 	RÜ!)×!8Ñ!8ˆGÔÜ—m‘m×1Ñ1×>Ñ>Ó@ˆGðRØ×'Ñ'¨°·±Ô?ô ˜gŸm™m¬ZÔ8Ü—J‘J×$Ñ$Ð%PÕQøô —>‘>ò CØ—>‘>Ð-Ø),¯©�GÔ&Ü—
‘
× Ñ ¤D¨£I×$6Ñ$6Ð#7°r¸#¸¸bÐ!A×BÑBûðCýð	Rûô, —>‘>ò CØ—>‘>Ð-Ø),¯©�GÔ&Ü—
‘
× Ñ ¤D¨£I×$6Ñ$6Ð#7°r¸#¸¸bÐ!A×BÒBûðCûð ˆÜ
�‰�×"Ñ"Ô#Ø˜Š>ðCØ—‘×0Ñ0Ø#°×0BÑ0Bð 1õ øô —>‘>ò CØ—>‘>Ð-Ø),¯©�GÔ&Ü—
‘
× Ñ ¤D¨£I×$6Ñ$6Ð#7°r¸#¸¸bÐ!A×BÑBûðCúð 	×"Ñ"Õ$ús­   ¯AC Â'M  Ã<L=ÄN6 ÄDL=È$N6 È'AL=É.KÊ
:L=ËL6ËAL1Ì,L=Ì1L6Ì6L=Ì9N6 Ì<L=Ì=N6 Í N3ÍAN.Î.N3Î6'RÏ'PÐRÐQ8ÐAQ3Ñ.RÑ3Q8Ñ8Rc                ó"   — t        | t        «      S ©N)r©   Ú_main©r¥   s    rk   Úpytest_cmdline_mainr®   x  s   € Ü˜¤Ó&Ð&rm   r‚   c                óê   — | j                   j                  |¬«       | j                   j                  |¬«       |j                  rt        j
                  S |j                  dk(  rt        j                  S y)z[Default command line protocol for initialization, session,
    running tests and reporting.r|   r   N)r†   Úpytest_collectionÚpytest_runtestloopÚtestsfailedr   rŠ   ÚtestscollectedÚNO_TESTS_COLLECTED)r¥   r}   s     rk   r¬   r¬   |  s`   € ð ‡K�K×!Ñ!¨'Ð!Ô2Ø
‡K�K×"Ñ"¨7Ð"Ô3à×ÒÜ×$Ñ$Ð$Ø	×	Ñ	 1Ò	$Ü×*Ñ*Ð*Ørm   c                ó$   — | j                  «        y r«   )Úperform_collectr|   s    rk   r°   r°   ‰  s   € Ø×ÑÕrm   c                ó„  — | j                   rR| j                  j                  j                  s2| j	                  | j                   › d| j                   dk7  rdnd› d�«      ‚| j                  j                  j
                  ryt        | j                  «      D ]©  \  }}|dz   t        | j                  «      k  r| j                  |dz      nd }|j                  j                  j                  ||¬«       | j                  r| j                  | j                  «      ‚| j                  sŒ�| j	                  | j                  «      ‚ y)Nz errorr+   ÚsÚ z during collectionT)ÚitemÚnextitem)r²   r¥   r�   rK   ÚInterruptedÚcollectonlyÚ	enumerateÚitemsÚlenr†   Úpytest_runtest_protocolÚ
shouldfailr‰   Ú
shouldstop)r}   Úirº   r»   s       rk   r±   r±   �  s  € Ø×Ò 7§>¡>×#8Ñ#8×#VÒ#VØ×!Ñ!Ø×"Ñ"Ð# 6°×1DÑ1DÈÒ1I©#ÈrÐ)RÐRdÐeó
ð 	
ð ‡~�~×Ñ×(Ò(Øä˜WŸ]™]Ó+ò :‰ˆˆ4Ø+,¨q©5´3°w·}±}Ó3EÒ+E�7—=‘=  Q¡Ò'È4ˆØ�‰×Ñ×0Ñ0°dÀXÐ0ÔNØ×ÒØ—.‘. ×!3Ñ!3Ó4Ð4Ø×ÓØ×%Ñ% g×&8Ñ&8Ó9Ð9ð:ð rm   c                ó¤   — 	 | j                  d«      j                  «       xs  | j                  dd«      j                  «       S # t        $ r Y y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©rC   s    rk   Ú_in_venvrË      sR   € ðà�M‰M˜,Ó'×/Ñ/Ó1ò @Ø�}‰}˜\¨9Ó5×=Ñ=Ó?ð	
øô ò Ùðús   ‚A A Á	AÁAc                ó<  ‡ — ‰ j                   dk(  ry|j                  d‰ j                  ¬«      }|xs g }|j                  d«      }|r|j	                  d„ |D «       «       ‰ |v ry|j                  d‰ j                  ¬«      }|xs g }|j                  d«      }|r|j	                  d	„ |D «       «       t        ˆ fd
„|D «       «      ry|j                  d«      }|st        ‰ «      ry‰ j                  «       r&|j                  d«      }t        ˆ fd„|D «       «      ryy )NÚ__pycache__TÚcollect_ignorerÊ   Úignorec              3  ó2   K  — | ]  }t        |«      –— Œ y ­wr«   r   ©Ú.0Úxs     rk   ú	<genexpr>z(pytest_ignore_collect.<locals>.<genexpr>¿  s   è ø€ Ò@°œL¨ŸOÑ@ùó   ‚Úcollect_ignore_globÚignore_globc              3  ó2   K  — | ]  }t        |«      –— Œ y ­wr«   r   rÑ   s     rk   rÔ   z(pytest_ignore_collect.<locals>.<genexpr>Ê  s   è ø€ ÒD°œL¨ŸOÑDùrÕ   c              3  ón   •K  — | ],  }t        j                   t        ‰«      t        |«      «      –— Œ. y ­wr«   )Úfnmatchrg   )rÒ   ÚglobÚcollection_paths     €rk   rÔ   z(pytest_ignore_collect.<locals>.<genexpr>Ì  s%   øè ø€ Ò
UÀŒ7�?‰?œ3˜Ó/´°T³×;Ñ
Uùs   ƒ25rJ   rP   c              3  ó6   •K  — | ]  }t        |‰«      –— Œ y ­wr«   r   )rÒ   ÚpatrÜ   s     €rk   rÔ   z(pytest_ignore_collect.<locals>.<genexpr>Õ  s   øè ø€ ÒM°CŒz˜#˜×/ÑMùs   ƒ)	ÚnameÚ_getconftest_pathlistÚparentÚ	getoptionÚextendÚanyrË   Úis_dirÚgetini)rÜ   r¥   Úignore_pathsÚ
excludeoptÚignore_globsÚexcludegloboptÚallow_in_venvÚnorecursepatternss   `       rk   Úpytest_ignore_collectrí   µ  s$  ø€ Ø×Ñ˜}Ò,Øà×/Ñ/Ø˜×5Ñ5ð 0ó €Lð  Ò% 2€LØ×!Ñ! (Ó+€JÙØ×ÑÑ@°ZÔ@Ô@à˜,Ñ&Øà×/Ñ/Ø O×$:Ñ$:ð 0ó €Lð  Ò% 2€LØ×%Ñ% mÓ4€NÙØ×ÑÑD°^ÔDÔDä
Ó
UÈÔ
UÔUØà×$Ñ$Ð%<Ó=€MÙœX oÔ6Øà×ÑÔØ"ŸM™M¨/Ó:ÐÜÓMÐ;LÔMÔMØàrm   c                ó0   — t         j                  || ¬«      S )NrÊ   )ÚDirÚfrom_parent©rC   rá   s     rk   Úpytest_collect_directoryrò   Û  s   € ô �?‰?˜6¨ˆ?Ó-Ð-rm   c                ó   — t        |j                  d«      xs g «      }|sy g }g }| D ]@  }|j                  j                  |«      r|j	                  |«       Œ0|j	                  |«       ŒB |r"|j
                  j                  |¬«       || d d  y y )NÚdeselect)r¿   )Útuplerâ   ÚnodeidÚ
startswithr<   r†   Úpytest_deselected)r¿   r¥   Údeselect_prefixesÚ	remainingÚ
deselectedÚcolitems         rk   Úpytest_collection_modifyitemsrý   á  s“   € Ü˜f×.Ñ.¨zÓ:Ò@¸bÓAÐÙØà€IØ€JØò &ˆØ�>‰>×$Ñ$Ð%6Ô7Ø×Ñ˜gÕ&à×Ñ˜WÕ%ð	&ñ Ø�‰×%Ñ%¨JÐ%Ô7Øˆ‰a‰ð rm   c                  ó(   — e Zd Z	 	 	 	 	 	 dd„Zdd„Zy)ÚFSHookProxyc                ó    — || _         || _        y r«   )ÚpmÚremove_mods)Úselfr  r  s      rk   Ú__init__zFSHookProxy.__init__ô  s   € ð
 ˆŒØ&ˆÕrm   c                ór   — | j                   j                  || j                  ¬«      }|| j                  |<   |S )N)Úremove_plugins)r  Úsubset_hook_callerr  Ú__dict__)r  rß   rÓ   s      rk   Ú__getattr__zFSHookProxy.__getattr__ü  s4   € Ø�G‰G×&Ñ& t¸D×<LÑ<LÐ&ÓMˆØˆ�‰�dÑØˆrm   N)r  r   r  zAbstractSet[object]rt   ÚNone)rß   rg   rt   zpluggy.HookCaller)rŸ   Ú
__module__Ú__qualname__r  r	  © rm   rk   rÿ   rÿ   ó  s(   „ ð'àð'ð )ð'ð 
ó	'ôrm   rÿ   c                  ó   — e Zd ZdZdZy)r¼   z*Signals that the test run was interrupted.ÚbuiltinsN©rŸ   r  r  Ú__doc__r  rm   rk   r¼   r¼     s
   „ Ù4à�Jrm   r¼   c                  ó   — e Zd ZdZy)r‰   z"Signals a stop as failed test run.Nr  r  rm   rk   r‰   r‰     s   „ Ú,rm   r‰   c                  ó$   — e Zd ZU dZded<   dd„Zy)Ú_bestrelpath_cacherÊ   r	   rC   c                ó<   — t        | j                  |«      }|| |<   |S r«   )r   rC   )r  rC   Úrs      rk   Ú__missing__z_bestrelpath_cache.__missing__  s    € Ü˜Ÿ	™	 4Ó(ˆØˆˆT‰
Øˆrm   N)rC   r	   rt   rg   )rŸ   r  r  Ú	__slots__Ú__annotations__r  r  rm   rk   r  r    s   … à€Ià
ƒJôrm   r  c                  óB   ‡ — 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.
    c               ó&   •— t         ‰| �  ||¬«      S )z¦The public constructor.

        :param parent: The parent collector of this Dir.
        :param path: The directory's path.
        :type path: pathlib.Path
        )rá   rC   )Úsuperrð   )Úclsrá   rC   Ú	__class__s      €rk   rð   zDir.from_parent%  s   ø€ ô ‰wÑ"¨&°tÐ"Ó<Ð<rm   c              #  ó:  K  — | j                   }| j                  }t        | j                  «      D ]å  }|j	                  «       rat        |j                  «      }| j                  j                  |d¬«      s|j                  ||¬«      rŒY|j                  || ¬«      }|€Œo|–— Œt|j                  «       sŒ…t        |j                  «      }| j                  j                  |«      s|j                  ||¬«      rŒÉ|j                  || ¬«      }|E d {  –—†  Œç y 7 Œ­w)NT©Úwith_parents)rÜ   r¥   rñ   ©Ú	file_pathrá   )r¥   Úihookr   rC   rå   r	   r}   Ú
isinitpathrí   rò   rÈ   Úpytest_collect_file)r  r¥   r$  ÚdirentryrC   ÚcolÚcolss          rk   r@   zDir.collect4  sû   è ø€ Ø—‘ˆð —
‘
ˆÜ §	¡	Ó*ò 	 ˆHØ�‰Ô Ü˜HŸM™MÓ*�Ø—|‘|×.Ñ.¨tÀ$Ð.ÔGØ×2Ñ2À4ÐPVÐ2ÔWØ Ø×4Ñ4¸$ÀtÐ4ÓL�Ø‘?Ø“Ià×!Ñ!Õ#Ü˜HŸM™MÓ*�Ø—|‘|×.Ñ.¨tÔ4Ø×2Ñ2À4ÐPVÐ2ÔWØ Ø×0Ñ0¸4ÈÐ0ÓM�Ø—‘ñ!	 ð   ús   ‚BDÂDÂ5ADÄDÄD)rá   únodes.CollectorrC   r	   rt   r%   )rt   z&Iterable[nodes.Item | nodes.Collector])rŸ   r  r  r  Úclassmethodrð   r@   Ú__classcell__©r  s   @rk   rï   rï     s=   ø„ ñ	ð ð=àð=ð ð	=ð
 
ô=ó ð=÷ rm   rï   c                  óä  ‡ — e Zd ZU dZeZeZded<   ded<   ded<   d ˆ fd„Zed!d	„«       Z	d"d
„Z
ed#d„«       Zej                  d$d„«       Zed#d„«       Zej                  d$d„«       Zed%d„«       Zd&d„Z ed¬«      d'd„«       Z ed¬«      d(d„«       ZeZddœ	 	 	 	 	 d)d„Zd*d„Z	 	 	 	 	 	 d+d„Ze	 d,	 	 	 	 	 d-d„«       Ze	 d,	 	 	 	 	 d.d„«       Z	 d/	 	 	 	 	 d.d„Z	 d0	 	 	 	 	 d1d„Zd2d„Zd3d„Zˆ xZS )4r‚   zoThe root of the collection tree.

    ``Session`` collects the initial paths given as arguments to pytest.
    r#   Ú_setupstater&   Ú_fixturemanagerúint | ExitCoder�   c           	     óÈ  •— t         ‰| �  d|j                  d d || d¬«       d| _        d| _        d| _        d| _        |j                  j                  j                  d«      | _        t        «       | _        t        «       | _        g | _        g | _        i | _        g | _        t#        |j                  «      | _        | j&                  j(                  j+                  | d¬«       y )Nr¹   )rß   rC   Úfspathrá   r¥   r}   rö   r   FrA   r}   )rß   )r  r  Úrootpathr²   r³   Ú_shouldstopÚ_shouldfailÚtraceÚrootÚgetÚ	frozensetÚ_initialpathsÚ_initialpaths_with_parentsÚ	_notfoundÚ_initial_partsÚ_collection_cacher¿   r  Ú_bestrelpathcacher¥   ÚpluginmanagerÚregister)r  r¥   r  s     €rk   r  zSession.__init__[  sÌ   ø€ Ü‰ÑØØ—‘ØØØØØð 	ô 	
ð ˆÔØˆÔØ',ˆÔØ',ˆÔØ—\‘\×&Ñ&×*Ñ*¨<Ó8ˆŒ
Ü.7«kˆÔÜ;D»;ˆÔ'ØFHˆŒØ8:ˆÔØGIˆÔØ')ˆŒ
ä2DÀVÇ_Á_Ó2UˆÔà�‰×!Ñ!×*Ñ*¨4°iÐ*Õ@rm   c                ó*   — | j                  |¬«      }|S )Nr­   )Ú_create)r  r¥   r}   s      rk   rƒ   zSession.from_configu  s   € àŸ;™;¨f˜;Ó5ˆØˆrm   c           	     ó    — 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    rk   Ú__repr__zSession.__repr__z  s_   € à�—‘×'Ñ'Ð(¨¨$¯)©)¨ð 5à×+Ñ+Ð,ð -Ø"×1Ñ1Ð2°!ð5ô �D˜,¨	Ó2ñ3ð 	3rm   c                ó   — | j                   S r«   )r5  rJ  s    rk   rÃ   zSession.shouldstop‚  ó   € à×ÑÐrm   c                ót   — |du r-| j                   r!t        j                  t        d«      d¬«       y || _         y )NFzCsession.shouldstop cannot be unset after it has been set; ignoring.r~   ©Ú
stacklevel)r5  ÚwarningsÚwarnr$   ©r  r“   s     rk   rÃ   zSession.shouldstop†  ó<   € ð �E‰>˜d×.Ò.Ü�M‰MÜØYóð õ	ð Ø ˆÕrm   c                ó   — | j                   S r«   )r6  rJ  s    rk   rÂ   zSession.shouldfail”  rM  rm   c                ót   — |du r-| j                   r!t        j                  t        d«      d¬«       y || _         y )NFzCsession.shouldfail cannot be unset after it has been set; ignoring.r~   rO  )r6  rQ  rR  r$   rS  s     rk   rÂ   zSession.shouldfail˜  rT  rm   c                óB   — | j                   j                  j                  S )zQThe path from which pytest was invoked.

        .. versionadded:: 7.0.0
        )r¥   Úinvocation_paramsrF   rJ  s    rk   r¢   zSession.startpath¦  s   € ð �{‰{×,Ñ,×0Ñ0Ð0rm   c                ó    — | j                   |   S r«   )r@  )r  Ú	node_paths     rk   Ú_node_location_to_relpathz!Session._node_location_to_relpath®  s   € à×%Ñ% iÑ0Ð0rm   T)Útryfirstc                ó    — | j                   r| j                  | j                   «      ‚| j                  r| j                  | j                  «      ‚y r«   )rÂ   r‰   rÃ   r¼   rJ  s    rk   Úpytest_collectstartzSession.pytest_collectstart²  s=   € à�?Š?Ø—+‘+˜dŸo™oÓ.Ð.Ø�?Š?Ø×"Ñ" 4§?¡?Ó3Ð3ð rm   c                óè   — |j                   rft        |d«      sY| xj                  dz  c_        | j                  j	                  d«      }|r&| j                  |k\  rd| j                  › d�| _        y y y y y )NÚwasxfailr+   r*   zstopping after z	 failures)ÚfailedÚhasattrr²   r¥   ÚgetvaluerÂ   )r  Úreportr*   s      rk   Úpytest_runtest_logreportz Session.pytest_runtest_logreport¹  sl   € à�=Š=¤¨°Ô!<Ø×Ò Ñ!ÕØ—k‘k×*Ñ*¨9Ó5ˆGÙ˜4×+Ñ+¨wÒ6Ø$3°D×4DÑ4DÐ3EÀYÐ"O�•ð 7ˆwð "=ˆ=rm   Fr   c               óx   — 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  rC   r!  Úpath_s       rk   r%  zSession.isinitpathÃ  s=   € ô$ # 4¬Ô.‘´D¸³JˆÙØ˜D×;Ñ;Ð;Ð;à˜D×.Ñ.Ð.Ð.rm   c                ó  — t        |t        «      r|n
t        |«      }| j                  j                  }|j	                  |«      }|j
                  j                  |«      }|rt        ||«      }|S | j                  j                  }|S r«   )	r’   r	   r¥   rA  Ú_getconftestmodulesÚ_conftest_pluginsÚ
differencerÿ   r†   )r  r3  rC   r  Úmy_conftestmodulesr  Úproxys          rk   ÚgethookproxyzSession.gethookproxyÛ  s{   € ä# F¬DÔ1‰v´t¸F³|ˆØ�[‰[×&Ñ&ˆð  ×3Ñ3°DÓ9ÐØ×*Ñ*×5Ñ5Ð6HÓIˆáä  KÓ0ˆEð ˆð —K‘K×$Ñ$ˆEØˆrm   c                ó  — ||v r||   S |j                  «       r6| j                  |j                  «      }|j                  || ¬«      }|�|fnd}n7|j	                  «       r%| j                  |«      }|j                  || ¬«      }nd}|||<   |S )z�Create a Collector for the given path.

        `path_cache` makes it so the same Collectors are returned for the same
        path.
        rñ   r  r"  )rå   rn  rá   rò   rÈ   r&  )r  rC   Ú
path_cacher$  r(  r)  s         rk   Ú_collect_pathzSession._collect_pathì  s¢   € ð �:ÑØ˜dÑ#Ð#à�;‰;Œ=Ø×%Ñ% d§k¡kÓ2ˆEØ*/×*HÑ*HØ $ð +Ió +ˆCð 9<¸¨s©fÈR‰Dà�\‰\Œ^Ø×%Ñ% dÓ+ˆEØ×,Ñ,°tÀDÐ,ÓI‰Dð ˆDàˆ
�4ÑØˆrm   c                 ó   — y r«   r  ©r  rQ   Úgenitemss      rk   r¶   zSession.perform_collect  s   € ð  #rm   c                 ó   — y r«   r  rs  s      rk   r¶   zSession.perform_collect  s   € ð 25rm   c                ó  — |€| j                   j                  }| j                  d| |«       | j                  j                  xj                  dz  c_        | j                   j
                  }g | _        g | _        i | _        g | _	        | j                  }| j                   j                  d«      }	 g }g }t        |«      D ��	cg c]Q  \  }}	t        | j                   j                  j                  |	|| j                   j                  j                   |¬«      ‘ŒS }
}}	| j                   j#                  d«      st%        |
«      | _        n|
| _        | j                  D ]]  }|j'                  |j(                  «       |j'                  |j(                  «       |j+                  |j(                  j,                  «       Œ_ t/        |«      | _        t/        |«      | _        t5        | «      }| j6                  j9                  |¬«       | j                  j                  xj                  dz  c_        | j                  rMg }| j                  D ]4  \  }	}|r|j'                  d|	› d|›d	�«       Œ!|j'                  d
|	› �«       Œ6 t;        |Ž ‚|s|j<                  }nG|j>                  r;|j<                  D ],  }| j                  j+                  | jA                  |«      «       Œ. | j                   jB                  jE                  «        |jG                  | | j                   |¬«       g | _        g | _        i | _        |jI                  | ¬«       |rtK        |«      | _&        |S c c}	}w # g | _        g | _        i | _        |jI                  | ¬«       w xY w)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.
        r¶   r+   rZ   ©Ú	as_pypathrZ   rI   ©rd  znot found: z
(no match in any of ú)zfound no collectors for )r}   r¥   r¿   r|   )'r¥   rQ   r7  r8  Úindentr†   r=  r>  r?  r¿   ræ   r¾   Úresolve_collection_argumentrX  rF   r�   Úpyargsrâ   Únormalize_collection_argumentsr<   rC   rã   rp   r:  r;  r<  r"   r$  Úpytest_collectreportr   ÚresultÚpassedrt  rA  Úcheck_pendingrý   Úpytest_collection_finishrÀ   r³   )r  rQ   rt  r†   r¿   rZ   ÚinitialpathsÚinitialpaths_with_parentsrÄ   ÚargÚcollection_argsÚcollection_argumentÚrepÚerrorsÚ
collectorsÚnodes                   rk   r¶   zSession.perform_collect  s,  € ð  ˆ<Ø—;‘;×#Ñ#ˆDà�
‰
Ð$ d¨DÔ1Ø�
‰
�‰×Ò !Ñ#Õà�{‰{×ÑˆàˆŒØ ˆÔØ!#ˆÔØˆŒ
Ø8<¿
¹
ˆØ,0¯K©K×,>Ñ,>Ø)ó-
Ð#ð:	8Ø')ˆLØ46Ð%ô (¨›o÷	ñ �A�sô ,Ø—K‘K×1Ñ1×5Ñ5ØØØ"Ÿk™k×0Ñ0×7Ñ7Ø0Köð	ˆOñ 	ð —;‘;×(Ñ(Ð)9Ô:ä&DÀ_Ó&U�Õ#à&5�Ô#à'+×':Ñ':ò SÐ#Ø×#Ñ#Ð$7×$<Ñ$<Ô=Ø)×0Ñ0Ð1D×1IÑ1IÔJØ)×0Ñ0Ð1D×1IÑ1I×1QÑ1QÕRðSô "+¨<Ó!8ˆDÔÜ.7Ð8QÓ.RˆDÔ+ä" 4Ó(ˆCØ�J‰J×+Ñ+°3Ð+Ô7Ø�J‰J�O‰O×"Ò" aÑ'Õ"Ø�~Š~Ø�Ø'+§~¡~ò H‘O�C˜Ù!ØŸ™Ø)¨#¨Ð.DÀZÀNÐRSÐTõð Ÿ™Ð(@ÀÀÐ&FÕGðHô ! &Ð)Ð)áØŸ
™
‘à—:’:Ø #§
¡
ò ?˜ØŸ
™
×)Ñ)¨$¯-©-¸Ó*=Õ>ð?ð �K‰K×%Ñ%×3Ñ3Ô5Ø×.Ñ.Ø T§[¡[¸ð /ô ð  ˆDŒNØ"$ˆDÔØ%'ˆDÔ"Ø×)Ñ)°$Ð)Ô7áÜ"% e£*ˆDÔàˆùów	øðf  ˆDŒNØ"$ˆDÔØ%'ˆDÔ"Ø×)Ñ)°$Ð)Õ7ús    Â/M ÃAMÄHM ÍM Í)Nc                ó„   — || j                   v r|r| j                   |   }|dfS t        |«      }|| j                   |<   |dfS )NTF)r?  r"   )r  rŒ  Úhandle_dupesr‰  s       rk   Ú_collect_one_nodezSession._collect_one_nodev  sR   € ð
 �4×)Ñ)Ñ)©lØ×(Ñ(¨Ñ.ˆCØ˜�9Ðä" 4Ó(ˆCØ+.ˆD×"Ñ" 4Ñ(Ø˜�:Ðrm   c              #  ó�  K  — i }| j                   j                  }| j                  D �]š  }| j                  d|«       | j                  j                  xj
                  dz  c_        |j                  }|j                  }|j                  }|j                  }|j                  «       r|rJ d||f›�«       ‚|g}|€7|j                  D ]'  }	|j                  |	«      s ny|j                  d|	«       Œ) nd|j                  d«      }
t        |j                  d«      D ]:  \  }}	|t!        |
«      kD  s|	j"                  |
|    k7  r n|j                  d|	«       Œ< d}g }| g |¢|¢fg}|�rø|j%                  «       \  }}|s|–— d}Œt'        |t(        j*                  «      sŒ:t'        |t,        «      r+t'        |d   t.        «      sJ ‚|j1                  |d   |«      }n‘t!        |«      dk(  xr( t'        |d   t.        «      xr |d   j3                  «        }| j5                  ||«      \  }}|s(|j6                  s|j8                  j;                  |¬	«       |j6                  sŒú|j<                  }d}t?        |«      D ]Î  }t'        |d   t.        «      rA|j                  |d   k(  }t@        jB                  d
k(  ry|swtE        |j                  |d   «      }n]t!        |«      dk(  r=|�|jF                  |d   |z   k(  }n7|jF                  j                  d«      d   |d   k(  }n|jF                  |d   k(  }|sŒ·|jI                  ||dd  f«       d}ŒÐ |s|jI                  |«       |r�Œø|s;djK                  tM        |«      g|¢­«      }| jN                  jI                  ||f«       | j                  j                  xj
                  dz  c_        �Œ� y ­w)Nzprocessing argumentr+   zinvalid arg r   ú.r~   FTry  Úwin32ú[ú::)(r¥   rA  r>  r7  r8  r{  rC   ÚpartsÚparametrizationÚmodule_namerå   rp   Ú_is_in_confcutdirÚinsertÚsplitr¾   rÀ   ÚstemÚpopr’   r   Ú	Collectorr‚   r	   rq  rÈ   r�  r�  r$  r  r€  Úreversedr•   Úplatformr   rß   r<   Újoinrg   r=  )r  rp  r  rˆ  ÚargpathÚnamesr–  r—  ÚpathsrC   Úmodule_name_partsrÄ   Úany_matched_in_initial_partÚnotfound_collectorsÚworkÚ	matchnodeÚ
matchpartsÚsubnodesrŽ  r‰  Ú	duplicateÚany_matched_in_collectorrŒ  Úis_matchÚ
report_args                            rk   r@   zSession.collectƒ  sÂ  è ø€ ð =?ˆ
à�[‰[×&Ñ&ˆà#'×#6Ñ#6ó r	(ÐØ�J‰JÐ,Ð.AÔBØ�J‰J�O‰O×"Ò" aÑ'Õ"à)×.Ñ.ˆGØ'×-Ñ-ˆEØ1×AÑAˆOØ-×9Ñ9ˆKð �~‰~ÔÙ ÐE L°'¸5Ð1AÐ0DÐ"EÓE�yà�IˆEð Ð"à#ŸO™Oò *�DØ×/Ñ/°Ô5ÙØ—L‘L  DÕ)ñ*ð %0×$5Ñ$5°cÓ$:Ð!Ü(¨¯©¸!Ó<ò *‘G�A�tØœ3Ð0Ó1Ò1°T·Y±YÐBSÐUVÐTVÑBWÒ5WÙØ—L‘L  DÕ)ð*ð +0Ð'Ø"$ÐàÐ'˜Ð' Ð'Ð(ðQˆDò Ø(,¯©«
Ñ%�	˜:ñ "Ø#’OØ26Ð/Øô " )¬U¯_©_Ô=Øô ˜i¬Ô1Ü% j°¡m´TÔ:Ð:Ð:Ø(×6Ñ6°zÀ!±}ÀjÓQ‘Hô
 ˜J›¨1Ñ,ò 4Ü& z°!¡}´dÓ;ò4à& q™M×1Ñ1Ó3ð$�Lð
 &*×%;Ñ%;¸IÀ|Ó%T‘N�C˜Ù$¨S¯ZªZð "Ÿ™×<Ñ<ÀCÐ<ÔHØŸ:š:Ø Ø"Ÿz™z�Hð ,1Ð(Ü$ XÓ.ò 8�Dä! *¨Q¡-´Ô6Ø#'§9¡9°
¸1±Ñ#=˜ÜŸ<™<¨7Ò2¹8ô
 (9¸¿¹ÀJÈqÁMÓ'R™Hô ˜z›?¨aÒ/à.Ð:à+/¯9©9¸
À1¹ÈÑ8WÑ+W¡ð
 ,0¯9©9¯?©?¸3Ó+?ÀÑ+BÀjÐQRÁmÑ+S¡à'+§y¡y°J¸q±MÑ'A˜HÚØŸ™ T¨:°a°b¨>Ð$:Ô;Ø37Ñ0ð78ñ: 0Ø'×.Ñ.¨yÔ9óM ñP /Ø!ŸY™Y¬¨G«Ð'=°uÑ'=Ó>�
Ø—‘×%Ñ% zÐ3FÐ&GÔHà�J‰J�O‰O×"Ò" aÑ'×"ñer	(ùs   ‚L(OÌ+/OÍA*Oc              #  óì  K  — | j                  d|«       t        |t        j                  «      r!|j                  j                  |¬«       |–— y t        |t        j                  «      sJ ‚t        |t        j                  «       }| j                  ||«      \  }}|j                  r*|j                  D ]  }| j                  |«      E d {  –—†  Œ |s|j                  j                  |¬«       y y 7 Œ&­w)Nrt  )rº   ry  )r7  r’   r   ÚItemr$  Úpytest_itemcollectedr�  ÚFiler�  r�  r€  rt  r  )r  rŒ  rŽ  r‰  r«  Úsubnodes         rk   rt  zSession.genitemsÿ  sÇ   è ø€ Ø�
‰
�:˜tÔ$Ü�dœEŸJ™JÔ'Ø�J‰J×+Ñ+°Ð+Ô6Ø‹Jä˜d¤E§O¡OÔ4Ð4Ð4ä)¨$´·
±
Ó;Ð;ˆLØ!×3Ñ3°D¸,ÓG‰NˆC�Ø�zŠzØ"Ÿz™zò 6�GØ#Ÿ}™}¨WÓ5×5Ñ5ð6áØ—
‘
×/Ñ/°sÐ/Õ;ð ð 6ús   ‚C	C4ÃC2Ã'C4)r¥   r   rt   r
  )r¥   r   rt   r‚   )rt   rg   )rt   ú
bool | str)r“   r´  rt   r
  )rt   r	   )rZ  r	   rt   rg   )rt   r
  )rd  zTestReport | CollectReportrt   r
  )rC   zstr | os.PathLike[str]r!  r;   rt   r;   )r3  zos.PathLike[str]rt   zpluggy.HookRelay)rC   r	   rp  z%dict[Path, Sequence[nodes.Collector]]rt   zSequence[nodes.Collector])..)rQ   úSequence[str] | Nonert  zLiteral[True]rt   zSequence[nodes.Item])rQ   rµ  rt  r;   rt   z&Sequence[nodes.Item | nodes.Collector])NT)T)rŒ  r*  rŽ  r;   rt   ztuple[CollectReport, bool])rt   z&Iterator[nodes.Item | nodes.Collector])rŒ  znodes.Item | nodes.Collectorrt   zIterator[nodes.Item])rŸ   r  r  r  r¼   r‰   r  r  r+  rƒ   rK  ÚpropertyrÃ   ÚsetterrÂ   r¢   r[  r   r^  re  r  r%  rn  rq  r   r¶   r�  r@   rt  r,  r-  s   @rk   r‚   r‚   L  sû  ø… ñð
 €KØ€FàÓà#Ó#ØÓõAð4 òó ðó3ð ò ó ð ð ×Ñò!ó ð!ð ò ó ð ð ×Ñò!ó ð!ð ò1ó ð1ó1ñ �tÔò4ó ð4ñ �tÔòPó ðPð 4Ðð #ñ	/à$ð/ð ð	/ð
 
ó/ó0ð"àðð :ðð 
#ó	ð> àJMð#Ø(ð#Ø:Gð#à	ò#ó ð#ð àADð5Ø(ð5Ø:>ð5à	/ò5ó ð5ð
 CGð_Ø(ð_Ø;?ð_à	/ó_ðH "ðàðð ðð 
$ó	óz(÷x<rm   F©rZ   c               ój  — 	 t         j                  j                  | «      }|€y|j                  �t        |j                  «      dk(  r|j                  S |r|j                  d   S |j                  €yt        j                  j                  |j                  «      S # t        t        t
        f$ r Y yw xY w)zaSearch sys.path for the given a dotted module name, and return its file
    system path if found.Nr   )rM   ÚutilÚ	find_specÚAttributeErrorÚImportErrorÚ
ValueErrorÚsubmodule_search_locationsrÀ   Úoriginr    rC   Údirname)r—  rZ   Úspecs      rk   Úsearch_pypathrÃ    s§   € ð
Ü�~‰~×'Ñ'¨Ó4ˆð €|Øð 	×'Ñ'Ð/Üˆt×.Ñ.Ó/°1Ò4ð �{‰{Ðá"ð ×.Ñ.¨qÑ1Ð1à‡{�{Ðàä�7‰7�?‰?˜4Ÿ;™;Ó'Ð'øô/ œK¬Ð4ò Ùðús   ‚B ÂB2Â1B2T)Úfrozenc                  óD   — e Zd ZU dZded<   ded<   ded<   ded<   d	ed
<   y)ÚCollectionArgumentzA resolved collection argument.r	   rC   zSequence[str]r•  ú
str | Noner–  r—  rc   Úoriginal_indexN)rŸ   r  r  r  r  r  rm   rk   rÆ  rÆ  4  s"   … á)à
ƒJØÓØÓØÓØÔrm   rÆ  rw  c               ó¶  — |j                  d«      \  }}}|j                  d«      ^}}	|r|	st        d|› �«      ‚|r|› |› �nd}
d}|rt        ||¬«      }|�|}|}| |z  }t	        |«      }t        |«      s!|rdnd}t        |j                  |¬«      «      ‚|	r1|j                  «       r!|rd	nd
}t        |j                  |¬«      «      ‚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[a,b]"

    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"],
            parametrization="[a,b]",
            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”  z(path cannot contain [] parametrization: Nr¸  z9module 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})rC   r•  r–  r—  rÈ  )	Ú	partitionrš  r   rÃ  r   r   Úformatrå   rÆ  )Úinvocation_pathr†  Ú	arg_indexrx  rZ   rq   ÚsquacketÚrestÚstrpathr•  r–  r—  Úpyarg_strpathr3  rz   s                  rk   r|  r|  ?  s  € ðR Ÿ=™=¨Ó-Ñ€Dˆ(�DØ—j‘j Ó&€O€GˆeÙ™ÜÐCÀCÀ5ÐIÓJÐJÙ-5˜˜
 4 &Ñ)¸4€OØ€KÙÜ%ØÐ1Lô
ˆð Ð$Ø!ˆKØ#ˆGØ˜wÑ&€FÜ˜&Ó!€FÜ�vÔñ ñ Hà5ð 	ô
 ˜Ÿ™¨˜Ó,Ó-Ð-Ù�—‘”ñ ñ HàNð 	ô
 ˜Ÿ™¨˜Ó,Ó-Ð-ÜØØØ'ØØ ôð rm   c                óœ  — |j                   | j                   k7  r2|j                  s%| j                   j                  |j                   «      S yt        |j                  «      t        | j                  «      kD  s/| j                  dt        |j                  «       |j                  k7  ry|j                  �|j                  | j                  k7  ryy)z/Check if `arg` is subsumed (contained) by `by`.FNT)rC   r•  Úis_relative_torÀ   r–  )r†  Úbys     rk   Ú"is_collection_argument_subsumed_byrÖ  Ž  s›   € ð
 
‡w�w�#—(‘(Òð �xŠxØ—8‘8×*Ñ*¨2¯7©7Ó3Ð3Øô ˆ2�8‰8ƒ}”s˜3Ÿ9™9“~Ò%¨¯©°?´S¸¿¹³]Ð)CÀrÇxÁxÒ)OØð
 
×ÑÐ%¨"×*<Ñ*<À×@SÑ@SÒ*SØØrm   c                ó¢   — t        | d„ ¬«      }g }d}|D ]$  }|�t        ||«      rŒ|j                  |«       |}Œ& |j                  d„ ¬«       |S )a  Normalize collection arguments to eliminate overlapping paths and parts.

    Detects when collection arguments overlap in either paths or parts and only
    keeps the shorter prefix, or the earliest argument if duplicate, preserving
    order. The result is prefix-free.
    c                óP   — | j                   | j                  | j                  xs dfS )Nr¹   )rC   r•  r–  rÊ  s    rk   ú<lambda>z0normalize_collection_arguments.<locals>.<lambda>¶  s    € ˜Ÿ™ 3§9¡9¨c×.AÑ.AÒ.GÀRÐH€ rm   )ÚkeyNc                ó   — | j                   S r«   )rÈ  rÊ  s    rk   rÙ  z0normalize_collection_arguments.<locals>.<lambda>¾  s   €  C×$6Ñ$6€ rm   )ÚsortedrÖ  r<   Úsort)r‡  Úcollection_args_sortedÚ
normalizedÚ	last_keptr†  s        rk   r~  r~  ¦  sj   € ô $ØÙHôÐð ,.€JØ€IØ%ò ˆØÐÔ$FÀsÈIÕ$VØ×Ñ˜cÔ"Ø‰Iðð ‡O�OÑ6€OÔ7ØÐrm   )ri   r   rt   r
  )rC   rg   rt   rg   )r¥   r   r¦   z2Callable[[Config, Session], int | ExitCode | None]rt   r1  )r¥   r   rt   r1  )r¥   r   r}   r‚   rt   zint | ExitCode | None)r}   r‚   rt   r
  )r}   r‚   rt   r;   )rC   r	   rt   r;   )rÜ   r	   r¥   r   rt   zbool | None)rC   r	   rá   r*  rt   znodes.Collector | None)r¿   zlist[nodes.Item]r¥   r   rt   r
  )r—  rg   rZ   r;   rt   rÇ  )rÍ  r	   r†  rg   rÎ  rc   rx  r;   rZ   r;   rt   rÆ  )r†  rÆ  rÕ  rÆ  rt   r;   )r‡  zSequence[CollectionArgument]rt   zlist[CollectionArgument])Zr  Ú
__future__r   ru   Úcollections.abcr   r   r   r   r   ÚAbstractSetÚdataclassesrÚ   re   rM   Úimportlib.utilr    Úpathlibr	   r•   Útypingr
   r   r   r   rQ  Úpluggyr�   r   Ú_pytest._codeÚ_pytest.configr   r   r   r   r   r   Ú_pytest.config.argparsingr   r   Ú_pytest.outcomesr   Ú_pytest.pathlibr   r   r   r   r   r   Ú_pytest.reportsr    r!   Ú_pytest.runnerr"   r#   Ú_pytest.warning_typesr$   Útyping_extensionsr%   Ú_pytest.fixturesr&   rl   rh   r©   r®   r¬   r°   r±   rË   rí   rò   rý   rÿ   r‹   r¼   rŒ   r‰   Ú	dataclassÚdictrg   r  Ú	Directoryrï   r�  r‚   rÃ  rÆ  r|  rÖ  r~  r  rm   rk   ú<module>rö     sW  ðÙ Nå "ã Ý $Ý $Ý $Ý $Ý .Û Û Û Û Û Û 	Ý Û 
Ý Ý Ý Ý  Û ã å Û Ý !Ý (Ý #Ý #Ý .Ý %Ý 7Ý ,Ý !Ý (Ý 'Ý &Ý 'Ý -Ý #Ý )Ý &Ý +Ý %Ý /ñ Ý&å/óhóVð28Øð8ØLð8àó8óv'ó
óóó&ó*#ðL.Ø
ð.Ø'ð.àó.ó÷$ñ ôÐ#ô ô-ˆYô -ð ×Ñô˜˜d C˜i™ó ó ðð ô0 ˆ%�/‰/ó 0 ó ð0 ðf ô@<ˆe�o‰oó @<ó ð@<ðH >Cñ!(Øð!(Ø6:ð!(àó!(ðH €×Ñ˜dÔ#÷ð ó $ðð Ø(-ñLØðLà	ðLð ðLð
 ðLð "&ðLð óLð^Ø	ðØ!3ðà	óð0Ø1ðàôrm   