§ |<ˆj¼-ã óò—dZddlZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl m Z ddl m Z dd l mZdd l mZdd lmZdd lmZdd lmZerddlmZedZddlmZddlmZddlmZddlmZddlmZddlmZddl m!Z!m"Z"ddl#m$Z$ddl#m%Z%ddl#m&Z&ddl'm(Z(ddl)m*Z*ddl)m+Z+ddl,m-Z-ee e.e/f¦«Z0e!ej1Gd„d ¦«¦«¦«Z2d!e e.fd"„Z3d#e$d!dfd$„Z4d%ed!dfd&„Z5e*d'¬(¦«d)e+d!e2fd*„¦«Z6d)e+d+e2d!efd,„Z7e*d)e+d-e2d!e eddffd.„¦«Z8d/ee9e%ffd0„Z:e&d1d1¬2¦«d3efd4„¦«Z;dS)5z>Support for providing temporary directories to test functions.éN)ÚPath)Úrmtree)ÚAny)ÚDict)Ú Generator)ÚOptional)Ú TYPE_CHECKING)ÚUnion)ÚItem)Ú CollectReport)ÚStashKey)ÚLiteral©ÚallÚfailedÚnone)ÚParseré)Ú LOCK_TIMEOUT)Úmake_numbered_dir)Úmake_numbered_dir_with_cleanup)Úrm_rf)Úcleanup_dead_symlinks)ÚfinalÚ get_user_id)ÚConfig)ÚExitCode)Úhookimpl)Úcheck_ispytest)Úfixture)ÚFixtureRequest)Ú MonkeyPatchcóü—eZdZUdZeeed<eed<eeed<eed<ded< dd d œd eed ed ddeede ddf d„Z e d d œde de ddfd„¦«Z dedefd„Zddede defd„Zdefd„ZdS)ÚTempPathFactoryz—Factory for temporary directories under the common base temp directory. The base directory can be configured using the ``--basetemp`` option. Ú_given_basetempÚ_traceÚ _basetempÚ_retention_countÚ RetentionTypeÚ_retention_policyNF©Ú _ispytestÚgiven_basetempÚretention_countÚretention_policyÚbasetempr,Úreturncóì—t|¦«|€d|_n>ttj t |¦«¦«¦«|_||_||_||_ ||_ dS©N) rr%rÚosÚpathÚabspathÚstrr&r(r*r')Úselfr-r.r/Útracer0r,s ú`/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/_pytest/tmpdir.pyÚ__init__zTempPathFactory.__init__;sm€õ �yÑ!Ô!Ð!Ø Ð !Ø#'ˆDÔ Ð õ $(­¬¯ª½¸NÑ8KÔ8KÑ(LÔ(LÑ#MÔ#MˆDÔ ØˆŒ Ø /ˆÔØ!1ˆÔØ!ˆŒˆˆóÚconfigcóR—t|¦«t| d¦«¦«}|dkrtd|›d�¦«‚| d¦«}|dvrtd|›d�¦«‚||jj|j d¦«||d ¬ ¦«S) zTCreate a factory according to pytest configuration. :meta private: Útmp_path_retention_countrz6tmp_path_retention_count must be >= 0. Current input: ú.Útmp_path_retention_policyrzKtmp_path_retention_policy must be either all, failed, none. Current input: ÚtmpdirT)r-r9r.r/r,)rÚintÚgetiniÚ ValueErrorÚoptionr0r9Úget)Úclsr=r,ÚcountÚpolicys r:Ú from_configzTempPathFactory.from_configRsÕ€õ �yÑ!Ô!Ð!Ý�F—M’MÐ"<Ñ=Ô=Ñ>Ô>ˆØ �1Š9ˆ9ÝØQÈÐQÐQÐQñôð ð—’Ð:Ñ;Ô;ˆØ Ð2Ð 2Ð 2ÝØgÐ^dÐgÐgÐgñôð ðˆsØ!œ=Ô1Ø”,×"Ò" 8Ñ,Ô,Ø!Ø#Øð  ñ ô ð r<Úbasenamecóð—tj |¦«}| ¦«|z  ¦«j| ¦«krt |›d�¦«‚|S)Nz& is not a normalized and relative path)r4r5ÚnormpathÚ getbasetempÚresolveÚparentrE)r8rLs r:Ú_ensure_relative_to_basetempz,TempPathFactory._ensure_relative_to_basetemprsj€Ý”7×#Ò# HÑ-Ô-ˆØ × Ò Ñ Ô  Ñ )× 2Ò 2Ñ 4Ô 4Ô ;¸t×?OÒ?OÑ?QÔ?QÒ QÐ QÝ ÐPÐPÐPÑQÔQÐ Q؈r<TÚnumberedcó$—| |¦«}|s>| ¦« |¦«}| d¬¦«n:t | ¦«|d¬¦«}| d|¦«|S)aCreate a new temporary directory managed by the factory. :param basename: Directory base name, must be a relative path. :param numbered: If ``True``, ensure the directory is unique by adding a numbered suffix greater than any existing one: ``basename="foo-"`` and ``numbered=True`` means that this function will create directories named ``"foo-0"``, ``"foo-1"``, ``"foo-2"`` and so on. :returns: The path to the new directory. éÀ©Úmode)ÚrootÚprefixrWÚmktemp)rRrOÚjoinpathÚmkdirrr&)r8rLrSÚps r:rZzTempPathFactory.mktempxs�€ð×4Ò4°XÑ>Ô>ˆØð %Ø× Ò Ñ"Ô"×+Ò+¨HÑ5Ô5ˆAØ �GŠG˜ˆGÑ Ô Ð Ð å! t×'7Ò'7Ñ'9Ô'9À(ÐQVÐWÑWÔWˆAØ �KŠK˜ !Ñ $Ô $Ð $؈r<có—|j�|jS|j�V|j}| ¦«rt|¦«| d¬¦«| ¦«}�njt j d¦«}t|ptj ¦«¦« ¦«}t¦«pd}|  d|›�¦«} | dd¬¦«n<#t$r/|  d ¦«}| dd¬¦«YnwxYwt¦«}|�]| ¦«}|j|krtd |›d �¦«‚|jd zd krt j||jdz¦«|j}|jdkrd }t-d||t.d¬¦«}|€ J|¦«‚||_| d|¦«|S)z�Return the base temporary directory, creating it if needed. :returns: The base temporary directory. NrUrVÚPYTEST_DEBUG_TEMPROOTÚunknownz pytest-of-T)rWÚexist_okzpytest-of-unknownzThe temporary directory z: is not owned by the current user. Fix this and try again.é?riÀÿÿÿrzpytest-)rYrXÚkeepÚ lock_timeoutrWz new basetemp)r'r%Úexistsrr\rPr4ÚenvironrGrÚtempfileÚ gettempdirÚget_userr[ÚOSErrorrÚstatÚst_uidÚst_modeÚchmodr(r*rrr&) r8r0Úfrom_envÚtemprootÚuserÚrootdirÚuidÚ rootdir_statrcs r:rOzTempPathFactory.getbasetemp�s/€ð Œ>Ð %Ø”>Ð !à Ô Ð +ØÔ+ˆHØ�ŠÑ Ô ð Ý�h‘”�Ø �NŠN ˆNÑ &Ô &Ð &Ø×'Ò'Ñ)Ô)ˆH‰Hå”z—~’~Ð&=Ñ>Ô>ˆHݘHÐ=­Ô(;Ñ(=Ô(=Ñ>Ô>×FÒFÑHÔHˆHÝ‘:”:Ð* ˆDð×'Ò'Ð(;°TÐ(;Ð(;Ñ<Ô<ˆGð 9Ø— ’  5°4� Ñ8Ô8Ð8Ð8øÝð 9ð 9ð 9à"×+Ò+Ð,?Ñ@Ô@�Ø— ’  5°4� Ñ8Ô8Ð8Ð8Ð8ð 9øøøõ‘-”-ˆC؈Ø&Ÿ|š|™~œ~� ØÔ&¨#Ò-Ð-Ý!ð2°7ð2ð2ð2ñôðð!Ô(¨5Ñ0°QÒ6Ð6Ý”H˜W lÔ&:¸VÑ&CÑDÔDÐDØÔ(ˆDØÔ%¨Ò/Ð/Ø�Ý5Ø ØØÝ)Øð ñôˆHðÐ#Ð# XÑ#Ô#Ð#Ø!ˆŒØ � Š �N HÑ-Ô-Ð-؈sÃ(DÄ6D9Ä8D9r3)T)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrÚ__annotations__rrCÚboolr;Ú classmethodrrKr7rRrZrO©r<r:r$r$,sˆ€€€€€€ððð ˜d”^Ð#Ð#Ñ#à €K€K�KؘŒ~ÐÐÑØÐÐÑØ&Ð&Ð&Ñ&ð$(ð "ð ð"ð"ð"à  œð"ðð"ð*ð "ð ˜4”.ð "ðð"ð ð"ð"ð"ð"ð.ð  ð  ð ð àð ðð  ð ð  ð ð ñ„[ð ð>°Sð¸Sððððð ð˜sð¨dð¸dððððð09˜Tð9ð9ð9ð9ð9ð9r<r$r1cód— ddl}| ¦«S#ttf$rYdSwxYw)zlReturn the current user name, or None if getuser() does not work in the current environment (see #1010).rN)ÚgetpassÚgetuserÚ ImportErrorÚKeyError)r~s r:ririÌsG€ðàˆˆˆà�ŠÑ Ô Ð øÝ �Ð "ððð؈tˆtðøøøs ‚š/®/r=cóÀ—t¦«}| |j¦«t |d¬¦«}| |d|d¬¦«dS)aCreate a TempPathFactory and attach it to the config object. This is to comply with existing plugins which expect the handler to be available at pytest_configure time, but ideally should be moved entirely to the tmp_path_factory session fixture. Tr+Ú_tmp_path_factoryF)ÚraisingN)r"Ú add_cleanupÚundor$rKÚsetattr)r=Úmprƒs r:Úpytest_configurer‰Øs^€õ ‰Œ€BØ ×Ò�r”wÑÔÐÝ'×3Ò3°FÀdÐ3ÑKÔKÐØ‡J‚JˆvÐ*Ð,=Àu€JÑMÔMÐMÐMÐMr<Úparsercóf—| ddd¬¦«| ddd¬¦«dS)Nr?zfHow many sessions should we keep the `tmp_path` directories, according to `tmp_path_retention_policy`.é)ÚhelpÚdefaultrAzvControls which directories created by the `tmp_path` fixture are kept around, based on test outcome. (all/failed/none)r)Úaddini)rŠs r:Úpytest_addoptionr�åsX€Ø ‡M‚MØ"Ø uØðñôðð  ‡M‚MØ#ðàð ñôðððr<Úsession)ÚscopeÚrequestcó—|jjS)zGReturn a :class:`pytest.TempPathFactory` instance for the test session.)r=rƒ)r“s r:Útmp_path_factoryr•ôs€ð Œ>Ô +Ð+r<ÚfactorycóŒ—|jj}tjdd|¦«}d}|d|…}| |d¬¦«S)Nz[\W]Ú_éT)rS)ÚnodeÚnameÚreÚsubrZ)r“r–r›ÚMAXVALs r:Ú_mk_tmprŸûsG€Ø Œ<Ô €DÝ Œ6�'˜3 Ñ %Ô %€DØ €FØ ���Œ=€DØ �>Š>˜$¨ˆ>Ñ .Ô .Ð.r<r•c#óK—t||¦«}|V—|jjj}|j}|jjt}|dkr'| dd¦«rt|d¬¦«|jjt=dS)aUReturn a temporary directory path object which is unique to each test function invocation, created as a sub directory of the base temporary directory. By default, a new base temporary directory is created each test session, and old bases are removed after 3 sessions, to aid in debugging. This behavior can be configured with :confval:`tmp_path_retention_count` and :confval:`tmp_path_retention_policy`. If ``--basetemp`` is used then it is cleared each session. See :ref:`base temporary directory`. The returned object is a :class:`pathlib.Path` object. rÚcallT©Ú ignore_errorsN) rŸr‘r=rƒr*ršÚstashÚtmppath_result_keyrGr)r“r•r5rJÚ result_dicts r:Útmp_pathr§s�èè€õ$ �7Ð,Ñ -Ô -€DØ €J€J€Jð)0¬Ô(>Ô(PÐØ Ô /€FØ”,Ô$Õ%7Ô8€Kà �ÒИkŸošo¨f°dÑ;Ô;Ðõ ˆt 4Ð(Ñ(Ô(Ð(àŒ ÔÕ-Ð.Ð.Ð.r<Ú exitstatuscóü—|jj}|j}|€dS|j}|dkr2|dkr,|j€%| ¦«rt |d¬¦«| ¦«rt|¦«dSdS)z�After each session, remove base directory if all the tests passed, the policy is "failed", and the basetemp is not specified by a user. NrrTr¢)r=rƒr'r*r%Úis_dirrr)r‘r¨r•r0rJs r:Úpytest_sessionfinishr«%s €ð)0¬Ô(HÐØÔ)€HØÐ؈à Ô /€Fà�aŠˆØ �hÒ Ð Ø Ô ,Ð 4à �?Š?Ñ Ô ð 1õ �8¨4Ð 0Ñ 0Ô 0Ð 0ð‡‚ÑÔð(ݘhÑ'Ô'Ð'Ð'Ð'ð(ð(r<T)ÚtryfirstÚ hookwrapperÚitemc#ó˜K—dV—}| ¦«}i}|j|j t|¦«|j<dSr3)Ú get_resultÚpassedr¤Ú setdefaultr¥Úwhen)r®r¡ÚoutcomeÚresultÚemptys r:Úpytest_runtest_makereportr·>sLèè€àˆeˆe€GØ#×.Ò.Ñ0Ô0€Fà€EØDJÄM€D„J×ÒÕ,¨eÑ4Ô4°V´[ÑAÐAÐAr<)rÇsðØDÐDØÐÐÐØ € € € Ø € € € Ø€€€ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ Ð Ð Ð Ð Ð ØÐÐÐÐÐàÐÐÐÐÐØ)Ð)Ð)Ð)Ð)Ð)Ø"Ð"Ð"Ð"Ð"Ð"àð5Ø)Ð)Ð)Ð)Ð)Ð)àÐ3Ô4€Mð-Ð,Ð,Ð,Ð,Ð,à!Ð!Ð!Ð!Ð!Ð!Ø&Ð&Ð&Ð&Ð&Ð&Ø3Ð3Ð3Ð3Ð3Ð3ØÐÐÐÐÐØ*Ð*Ð*Ð*Ð*Ð*Ø-Ð-Ð-Ð-Ð-Ð-Ð-Ð-Ø!Ð!Ð!Ð!Ð!Ð!Ø#Ð#Ð#Ð#Ð#Ð#Ø#Ð#Ð#Ð#Ð#Ð#Ø-Ð-Ð-Ð-Ð-Ð-Ø$Ð$Ð$Ð$Ð$Ð$Ø+Ð+Ð+Ð+Ð+Ð+Ø+Ð+Ð+Ð+Ð+Ð+à.�X˜d 3¨ 9œoÔ.Ñ0Ô0ÐðØ Ôð[ð[ð[ð[ð[ñ[ô[ñÔñ„ð[ð| �(˜3”-ð ð ð ð ð N˜Vð N¨ð Nð Nð Nð Nð ˜Vð ¨ð ð ð ð 𠀈yÐÑÔð,˜nð,°ð,ð,ð,ñÔð,ð /�^ð/¨oð/À$ð/ð/ð/ð/ð ð/Ø ð/Ø/>ð/àˆt�T˜4ÐÔ ð/ð/ð/ñ „ð/ðB(¨e°C¸°MÔ.Bð(ð(ð(ð(ð2 €�4 TÐ*Ñ*Ô*ðR DðRðRðRñ+Ô*ðRðRðRr<