+
    yj-                    n   R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIt^ RIH	t	 ^ RI
t
^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI H!t! ^ RI H"t" ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t( ^ RI)H*t* ]*]]+],3,          ,          ! 4       t-]R1,          t.]]P^                   ! R R4      4       4       t0R R lt1R R  lt2R! R" lt3]!! R#R$7      R% R& l4       t4R' R( lt5]!R) R* l4       t6R+ R, lt7]! R-R-R.7      R/ R0 l4       t8R# )2z>Support for providing temporary directories to test functions.)annotationsN)Path)rmtree)Any)Dict)final)	Generator)Literal)cleanup_dead_symlinks)LOCK_TIMEOUT)make_numbered_dir)make_numbered_dir_with_cleanup)rm_rf)get_user_id)Config)ExitCode)hookimpl)Parser)check_ispytest)fixture)FixtureRequest)MonkeyPatch)Item)
TestReport)StashKeyc                      ] tR t^)t$ RtR]R&   R]R&   R]R&   R]R&   R	]R
&   RRR/R R lllt]RR/R R ll4       tR R lt	RR R llt
R R ltRtR# )TempPathFactoryzFactory for temporary directories under the common base temp directory.

The base directory can be configured using the ``--basetemp`` option.
Path | None_given_basetempr   _trace	_basetempint_retention_countRetentionType_retention_policyN	_ispytestFc               0    V ^8  d   QhRRRRRRRRRR	R
R/# )   given_basetempr   retention_countr!   retention_policyr#   basetempr%   boolreturnNone )formats   "B/var/www/html/2rare/lib/python3.14/site-packages/_pytest/tmpdir.py__annotate__TempPathFactory.__annotate__8   sF     " "#" " (	" " " 
"    c               	    \        V4       Vf	   R V n        M6\        \        P                  P                  \        V4      4      4      V n        W@n        W n        W0n	        WPn
        R # N)r   r   r   ospathabspathstrr   r"   r$   r    )selfr(   r)   r*   tracer+   r%   s   &&&&&&$r1   __init__TempPathFactory.__init__8   sQ     	y!!#'D 
 $(N8K(L#MD  /!1!r4   c               $    V ^8  d   QhRRRRRR/# )r'   configr   r%   r,   r-   r   r/   )r0   s   "r1   r2   r3   P   s(     
 

 	

 

r4   c               :   \        V4       \        VP                  R4      4      pV^ 8  d   \        RV R24      hVP                  R4      pVR	9  d   \        RV R24      hV ! VP                  P
                  VP                  P                  R4      VVRR7      # )
zDCreate a factory according to pytest configuration.

:meta private:
tmp_path_retention_countz6tmp_path_retention_count must be >= 0. Current input: .tmp_path_retention_policyzKtmp_path_retention_policy must be either all, failed, none. Current input: tmpdirT)r(   r<   r)   r*   r%   allfailednone)r   r!   getini
ValueErroroptionr+   r<   get)clsr@   r%   countpolicys   &&$  r1   from_configTempPathFactory.from_configO   s     	y!FMM"<=>19HqQ  :;22]^d]eefg  !==11,,""8,!#
 	
r4   c                    V ^8  d   QhRRRR/# )r'   basenamer:   r-   r/   )r0   s   "r1   r2   r3   o   s      S S r4   c                	    \         P                  P                  V4      pV P                  4       V,          P	                  4       P
                  V P                  4       8w  d   \        V R 24      hV# )z& is not a normalized and relative path)r7   r8   normpathgetbasetempresolveparentrK   )r;   rT   s   &&r1   _ensure_relative_to_basetemp,TempPathFactory._ensure_relative_to_basetempo   s\    77##H-)224;;t?O?O?QQz)OPQQr4   c               $    V ^8  d   QhRRRRRR/# )r'   rT   r:   numberedr,   r-   r   r/   )r0   s   "r1   r2   r3   u   s!      s d d r4   c                    V P                  V4      pV'       g4   V P                  4       P                  V4      pVP                  RR7       V# \	        V P                  4       VRR7      pV P                  RV4       V# )a  Create 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prefixra   mktemp)rZ   rW   joinpathmkdirr   r   )r;   rT   r]   ps   &&& r1   rd   TempPathFactory.mktempu   sr     44X>  "++H5AGGG  "t'7'7'9(QVWAKK!$r4   c                   V ^8  d   QhRR/# )r'   r-   r   r/   )r0   s   "r1   r2   r3      s     9 9T 9r4   c                ,   V P                   e   V P                   # V P                  eR   V P                  pVP                  4       '       d   \        V4       VP	                  RR7       VP                  4       pEMA\        P                  P                  R4      p\        T;'       g    \        P                  ! 4       4      P                  4       p\        4       ;'       g    RpVP                  RV 24      p VP	                  RRR7       \        4       pVep   VP!                  4       pVP"                  V8w  d   \        R	V R
24      hVP$                  ^?,          ^ 8w  d(   \        P&                  ! WWP$                  R,          4       V P(                  pV P*                  R8X  d   ^ p\-        RVV\.        RR7      pVf   Q V4       hWn         V P1                  RV4       V#   \         d)    TP                  R4      pTP	                  RRR7        ELi ; i)ziReturn the base temporary directory, creating it if needed.

:returns:
    The base temporary directory.
r_   r`   PYTEST_DEBUG_TEMPROOTunknownz
pytest-of-T)ra   exist_okzpytest-of-unknownzThe temporary directory z: is not owned by the current user. Fix this and try again.rI   zpytest-)rc   rb   keeplock_timeoutra   znew basetempi)r    r   existsr   rf   rX   r7   environrM   r   tempfile
gettempdirget_userre   OSErrorr   statst_uidst_modechmodr"   r$   r   r   r   )	r;   r+   from_envtemprootuserrootdiruidrootdir_statrn   s	   &        r1   rW   TempPathFactory.getbasetemp   s    >>%>>!+++H  hNNN&'')Hzz~~&=>HH==(;(;(=>FFHH:**D ''*TF(;<G9548 -C&||~&&#-!27) <2 2  !((50Q6HHW&:&:V&CD((D%%/5 )H #-X-#!NH-C  9"++,?@5489s   8G   /HH)r    r   r"   r$   r   r6   )T)__name__
__module____qualname____firstlineno____doc____annotations__r=   classmethodrQ   rZ   rd   rW   __static_attributes__r/   r4   r1   r   r   )   sl    
 ! K$$"  " ". 
  	
 
>09 9r4   r   c                   V ^8  d   QhRR/# )r'   r-   z
str | Noner/   )r0   s   "r1   r2   r2      s     	 	* 	r4   c                 f     ^ RI p V P                  4       #   \        \        \        3 d     R# i ; i)zhReturn the current user name, or None if getuser() does not work
in the current environment (see #1010).N)getpassgetuserImportErrorru   KeyError)r   s    r1   rt   rt      s0      (+ s    00c                    V ^8  d   QhRRRR/# )r'   r@   r   r-   r.   r/   )r0   s   "r1   r2   r2      s     
N 
NV 
N 
Nr4   c                    \        4       pV P                  VP                  4       \        P	                  V RR7      pVP                  V RVRR7       R# )zCreate 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.
T)r%   _tmp_path_factoryF)raisingN)r   add_cleanupundor   rQ   setattr)r@   mpr   s   &  r1   pytest_configurer      sI     
B
rww'33Fd3KJJv*,=uJMr4   c                    V ^8  d   QhRRRR/# )r'   parserr   r-   r.   r/   )r0   s   "r1   r2   r2      s      V  r4   c                V    V P                  R R^R7       V P                  RRRR7       R# )rB   zfHow many sessions should we keep the `tmp_path` directories, according to `tmp_path_retention_policy`.)helpdefaultrD   zvControls which directories created by the `tmp_path` fixture are kept around, based on test outcome. (all/failed/none)rG   N)addini)r   s   &r1   pytest_addoptionr      s:    
MM"u   MM#	  r4   session)scopec                    V ^8  d   QhRRRR/# )r'   requestr   r-   r   r/   )r0   s   "r1   r2   r2      s     , ,n , ,r4   c                .    V P                   P                  # )zGReturn a :class:`pytest.TempPathFactory` instance for the test session.)r@   r   )r   s   &r1   tmp_path_factoryr      s     >>+++r4   c               $    V ^8  d   QhRRRRRR/# )r'   r   r   factoryr   r-   r   r/   )r0   s   "r1   r2   r2      s!     / /^ /o /$ /r4   c                    V P                   P                  p\        P                  ! R RV4      p^pVRV pVP	                  VRR7      # )z[\W]_NT)r]   )nodenameresubrd   )r   r   r   MAXVALs   &&  r1   _mk_tmpr      sF    <<D66'3%DF=D>>$>..r4   c               $    V ^8  d   QhRRRRRR/# )r'   r   r   r   r   r-   zGenerator[Path, None, None]r/   )r0   s   "r1   r2   r2     s$     / ///>/ /r4   c              #  T  "   \        W4      pVx  V P                  P                  P                  pVP                  pV P
                  P                  \        ,          pVR8X  d&   VP                  RR4      '       d   \        VRR7       V P
                  P                  \         R# 5i)a?  Return 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:`temporary directory location and retention`.

The returned object is a :class:`pathlib.Path` object.
rH   callTignore_errorsN)
r   r   r@   r   r$   r   stashtmppath_result_keyrM   r   )r   r   r8   rP   result_dicts   &&   r1   tmp_pathr      s     " 7-D
J )0(>(>(P(P//F,,$$%78Kkoofd;; 	t4(-.s   A;B(>*B(c                   V ^8  d   QhRR/# )r'   
exitstatuszint | ExitCoder/   )r0   s   "r1   r2   r2   !  s     ( (n (r4   c                2   V P                   P                  pVP                  pVf   R# VP                  pV^ 8X  d9   VR8X  d2   VP                  f$   VP                  4       '       d   \        VRR7       VP                  4       '       d   \        V4       R# R# )zAfter each session, remove base directory if all the tests passed,
the policy is "failed", and the basetemp is not specified by a user.
NrH   Tr   )r@   r   r    r$   r   is_dirr   r
   )r   r   r   r+   rP   s   &&   r1   pytest_sessionfinishr   !  s     )0(H(H))H//Fah,,4?? 840 h' r4   T)wrappertryfirstc                    V ^8  d   QhRRRR/# )r'   itemr   r-   z'Generator[None, TestReport, TestReport]r/   )r0   s   "r1   r2   r2   ;  s      
,r4   c              #     "   R x pVP                   f   Q h/ pVP                  V P                  P                  \        V4      VP                   &   V# 5ir6   )whenpassedr   
setdefaultr   )r   r   repemptys   &&  r1   pytest_runtest_makereportr   :  sJ      C88EADDJJ,e4SXX>Js   AArF   )9r   
__future__r   dataclassesr7   pathlibr   r   shutilr   rr   typingr   r   r   r   r	   r
   r   r   r   r   _pytest.compatr   _pytest.configr   r   r   _pytest.config.argparsingr   _pytest.deprecatedr   _pytest.fixturesr   r   _pytest.monkeypatchr   _pytest.nodesr   _pytest.reportsr   _pytest.stashr   r:   r,   r   r#   	dataclassr   rt   r   r   r   r   r   r   r   r/   r4   r1   <module>r      s   D "  	  	        * ! & 3  & ! # # , - $ + +  & " d39o.0 /0 [ [  [|	
N 	y, ,/ 	/ 	/@(2 
$& 'r4   