Ë
    æØjjcX  ã                  ó2  — U d 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
mZ ddlZddlZddlmZ dd	l
mZ dd
l
mZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl 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ddœZ*de+d<   d2d„Z,eejZ                   G d „ d!«      «       «       Z. G d"„ d#«      Z/ G d$„ d%«      Z0 G d&„ d'«      Z1 G d(„ d)«      Z2d3d*„Z3d4d+„Z4 ed,¬-«      d5d.„«       Z5e!d6d/„«       Z6d7d0„Z7d8d1„Z8y)9z%Implementation of the cache provider.é    )Úannotations)Ú	Generator)ÚIterableN)ÚPath)Úfinalé   )Úresolve_from_str)Úrm_rf)ÚCollectReport)Únodes)ÚTerminalWriter)ÚConfig)ÚExitCode)Úhookimpl)ÚParser)Úcheck_ispytest)Úfixture)ÚFixtureRequest)ÚSession)Ú	Directory)ÚFile)Ú
TestReports.  # pytest cache directory #

This directory contains data from the pytest's cache plugin,
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.

**Do not** commit this to version control.

See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
s%   # Created by pytest automatically.
*
s¿   Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by pytest.
# For information about cache directory tags, see:
#	https://bford.info/cachedir/spec.html
)z	README.mdz
.gitignorezCACHEDIR.TAGzdict[str, bytes]ÚCACHEDIR_FILESc                ó–  — | j                   j                  dd¬«       t        t        j                  d| j                   ¬«      «      }	 t        j                  d«      }t        j                  |«       |j                  d|z
  «       t        j                  «       D ]%  \  }}|j                  |«      j                  |«       Œ' |j                  | «       t#        j$                  |d¬«       y# t        $ r7}|j                  t        j                  t        j                   fvr‚ Y d}~ŒSd}~ww xY w# t#        j$                  |d¬«       w xY w)	a  Create the pytest cache directory atomically with supporting files.

    Creates a temporary directory with README.md, .gitignore, and CACHEDIR.TAG,
    then atomically renames it to the target location. If another process wins
    the race, the temporary directory is cleaned up.
    T)ÚparentsÚexist_okzpytest-cache-files-)ÚprefixÚdiré   iÿ  N)Úignore_errors)ÚparentÚmkdirr   ÚtempfileÚmkdtempÚosÚumaskÚchmodr   ÚitemsÚjoinpathÚwrite_bytesÚrenameÚOSErrorÚerrnoÚ	ENOTEMPTYÚEEXISTÚshutilÚrmtree)ÚtargetÚpathr&   ÚnameÚcontentÚes         úW/opt/eval-harness/bench_task/venv/lib/python3.12/site-packages/_pytest/cacheprovider.pyÚ_make_cachedirr8   :   sý   € ð ‡M�M×Ñ ¨tÐÔ4Ü”× Ñ Ð(=À6Ç=Á=ÔQÓR€Dð0ô —‘˜“ˆÜ
�‰�ŒØ�
‰
�5˜5‘=Ô!ä+×1Ñ1Ó3ò 	5‰MˆD�'Ø�M‰M˜$Ó×+Ñ+¨GÕ4ð	5ð 	�‰�FÔô 	�‰�d¨$Ö/øô ò ð
 �7‰7œ5Ÿ?™?¬E¯L©LÐ9Ñ9Øô :ûðûô 	�‰�d¨$Ö/ús+   Á	BC, Ã,	D,Ã5-D'Ä"D/ Ä'D,Ä,D/ Ä/Ec                  ó  — e Zd ZU dZ ej
                  d¬«      Zded<    ej
                  d¬«      Zded<   dZ	d	Z
dd
œ	 	 	 	 	 	 	 dd„Zedd
œdd„«       Zeddd„«       Zedd
œdd„«       Zdd
œdd„Zdd„Zdd„Zdd„Zd d„Zd!d„Zd"d„Zy)#ÚCachez Instance of the `cache` fixture.F)Úreprr   Ú	_cachedirr   Ú_configÚdÚv©Ú	_ispytestc               ó6   — t        |«       || _        || _        y ©N)r   r<   r=   )ÚselfÚcachedirÚconfigrA   s       r7   Ú__init__zCache.__init__g   s   € ô 	�yÔ!Ø!ˆŒØˆ�ó    c               ó¼   — t        |«       | j                  |d¬«      }|j                  d«      r#|j                  «       r| j	                  |d¬«        | ||d¬«      S )zHCreate the Cache instance for a Config.

        :meta private:
        Tr@   Ú
cacheclear)r   Úcache_dir_from_configÚ	getoptionÚis_dirÚclear_cache)ÚclsrF   rA   rE   s       r7   Ú
for_configzCache.for_confign   sW   € ô 	�yÔ!Ø×,Ñ,¨V¸tÐ,ÓDˆØ×Ñ˜LÔ)¨h¯o©oÔ.?Ø�O‰O˜H°ˆOÔ5Ù�8˜V¨tÔ4Ð4rH   c                ó–   — t        |«       | j                  | j                  fD ]#  }||z  }|j                  «       sŒt	        |«       Œ% y)zfClear the sub-directories used to hold cached directories and values.

        :meta private:
        N)r   Ú_CACHE_PREFIX_DIRSÚ_CACHE_PREFIX_VALUESrM   r
   )rO   rE   rA   r   r>   s        r7   rN   zCache.clear_cachez   sF   € ô 	�yÔ!Ø×-Ñ-¨s×/GÑ/GÐHò 	ˆFØ˜6Ñ!ˆAØ�x‰x�zÜ�a•ñ	rH   c               ób   — t        |«       t        | j                  d«      | j                  «      S )zRGet the path to the cache directory for a Config.

        :meta private:
        Ú	cache_dir)r   r	   ÚgetiniÚrootpath)rF   rA   s     r7   rK   zCache.cache_dir_from_config†   s&   € ô 	�yÔ!Ü §¡¨kÓ :¸F¿O¹OÓLÐLrH   c          	     ó²   — t        |«       ddl}ddlm} |j	                   ||r |j
                  di |¤Žn|«      | j                  j                  d¬«       y)z7Issue a cache warning.

        :meta private:
        r   N)ÚPytestCacheWarningé   )Ú
stacklevel© )r   ÚwarningsÚ_pytest.warning_typesrY   ÚwarnÚformatr=   Úhook)rD   ÚfmtrA   Úargsr]   rY   s         r7   r_   z
Cache.warn�   sM   € ô
 	�yÔ!Ûå<à�‰Ù±T˜z˜sŸz™zÑ1¨DÒ1¸sÓCØ�L‰L×ÑØð 	õ 	
rH   c                óJ   — | j                  «        |j                  dd¬«       y )NT)r   r   )Ú&_ensure_cache_dir_and_supporting_filesr"   )rD   r3   s     r7   Ú_mkdirzCache._mkdirŸ   s   € Ø×3Ñ3Ô5Ø�
‰
˜D¨$ˆ
Õ/rH   c                óÐ   — t        |«      }t        |j                  «      dkD  rt        d«      ‚| j                  j                  | j                  |«      }| j                  |«       |S )aã  Return a directory path object with the given name.

        If the directory does not yet exist, it will be created. You can use
        it to manage files to e.g. store/retrieve database dumps across test
        sessions.

        .. versionadded:: 7.0

        :param name:
            Must be a string not containing a ``/`` separator.
            Make sure the name contains your plugin or application
            identifiers to prevent clashes with other cache users.
        r   z.name is not allowed to contain path separators)r   ÚlenÚpartsÚ
ValueErrorr<   r)   rR   rf   )rD   r4   r3   Úress       r7   r"   zCache.mkdir£   sV   € ô �D‹zˆÜˆt�z‰z‹?˜QÒÜÐMÓNÐNØ�n‰n×%Ñ% d×&=Ñ&=¸tÓDˆØ�‰�CÔØˆ
rH   c                ó`   — | j                   j                  | j                  t        |«      «      S rC   )r<   r)   rS   r   )rD   Úkeys     r7   Ú_getvaluepathzCache._getvaluepath¸   s#   € Ø�~‰~×&Ñ& t×'@Ñ'@Ä$ÀsÃ)ÓLÐLrH   c                óÐ   — | j                  |«      }	 |j                  dd¬«      5 }t        j                  |«      cddd«       S # 1 sw Y   yxY w# t        t
        f$ r |cY S w xY w)aœ  Return the cached value for the given key.

        If no value was yet cached or the value cannot be read, the specified
        default is returned.

        :param key:
            Must be a ``/`` separated value. Usually the first
            name is the name of your plugin or your application.
        :param default:
            The value to return in case of a cache-miss or invalid cache value.
        ÚrúUTF-8©ÚencodingN)rn   ÚopenÚjsonÚloadrj   r,   )rD   rm   Údefaultr3   Úfs        r7   Úgetz	Cache.get»   sc   € ð ×!Ñ! #Ó&ˆð	Ø—‘˜3¨�Ó1ð $°QÜ—y‘y “|÷$÷ $ò $ûäœGÐ$ò 	ØŠNð	ús-   “A ¦A»	A ÁAÁ
A ÁA ÁA%Á$A%c                óÂ  — | j                  |«      }	 | j                  |j                  «       t        j                  |dd¬«      }	 |j                  d	d
¬«      }|5  |j                  |«       ddd«       y# t        $ r#}| j	                  d|› d|› �d¬«       Y d}~yd}~ww xY w# 1 sw Y   yxY w# t        $ r#}| j	                  d|› d|› �d¬«       Y d}~yd}~ww xY w)aN  Save value for the given key.

        :param key:
            Must be a ``/`` separated value. Usually the first
            name is the name of your plugin or your application.
        :param value:
            Must be of any combination of basic python types,
            including nested types like lists of dictionaries.
        zcould not create cache path z: Tr@   NFé   )Úensure_asciiÚindentÚwrq   rr   zcache could not write path )	rn   rf   r!   r,   r_   ru   Údumpsrt   Úwrite)rD   rm   Úvaluer3   ÚexcÚdatarx   s          r7   Úsetz	Cache.setÎ   só   € ð ×!Ñ! #Ó&ˆð	Ø�K‰K˜Ÿ™Ô$ô �z‰z˜%¨e¸AÔ>ˆð		Ø—	‘	˜#¨�	Ó0ˆAð ñ Ø—‘˜”÷ð øô ò 	Ø�I‰IØ.¨t¨f°B°s°eÐ<Øð ô ô ûð	ú÷ð ûô ò 	Ø�I‰IØ-¨d¨V°2°c°UÐ;Øð ÷ ñ ûð	ús;   “A7 ÁB2 ÁB&Á7	B#Â BÂB#Â&B/Â2	CÂ;CÃCc                ód   — | j                   j                  «       st        | j                   «       yy)z.Create the cache dir and its supporting files.N)r<   rM   r8   ©rD   s    r7   re   z,Cache._ensure_cache_dir_and_supporting_filesí   s#   € à�~‰~×$Ñ$Ô&Ü˜4Ÿ>™>Õ*ð 'rH   N)rE   r   rF   r   rA   ÚboolÚreturnÚNone)rF   r   rA   r‡   rˆ   r:   )F)rE   r   rA   r‡   rˆ   r‰   )rF   r   rA   r‡   rˆ   r   )rb   ÚstrrA   r‡   rc   Úobjectrˆ   r‰   )r3   r   rˆ   r‰   )r4   rŠ   rˆ   r   )rm   rŠ   rˆ   r   )rm   rŠ   )rm   rŠ   r�   r‹   rˆ   r‰   ©rˆ   r‰   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚdataclassesÚfieldr<   Ú__annotations__r=   rR   rS   rG   ÚclassmethodrP   rN   ÚstaticmethodrK   r_   rf   r"   rn   ry   r„   re   r\   rH   r7   r:   r:   Y   sÞ   … ñ +à'�k×'Ñ'¨UÔ3€IˆtÓ3Ø'�k×'Ñ'¨UÔ3€GˆVÓ3ð Ðð Ðð DIñØðØ&,ðØ<@ðà	óð Ø=Bô 	5ó ð	5ð ó	ó ð	ð ØCHô Mó ðMð 38õ 
ó 0óó*Móó&ô>+rH   r:   c                  ó<   — e Zd Zdd„Z ed¬«      	 	 	 	 dd„«       Zy)ÚLFPluginCollWrapperc                ó    — || _         d| _        y )NF)ÚlfpluginÚ_collected_at_least_one_failure©rD   r™   s     r7   rG   zLFPluginCollWrapper.__init__ô   s   € Ø ˆŒØ/4ˆÕ,rH   T)Úwrapperc              #  ó  ‡‡K  — d –—}t        |t        t        z  «      r;| j                  j                  Šdˆfd„}t        |j                  |d¬«      |_        |S t        |t        «      �r|j                  | j                  j                  v rð|j                  }| j                  j                  Š| j                  s`t        ˆfd„|D «       «      s|S | j                  j                  j                  j                  t        | j                  «      d«       d| _
        |j                   }|D �cg c]G  }|j"                  ‰v s5|j%                  |j                  «      st        |t&        j(                  «      r|‘ŒI c}|d d  |S c c}w ­w)Nc                ó    •— | j                   ‰v S rC   )r3   )ÚnodeÚlf_pathss    €r7   Úsort_keyz@LFPluginCollWrapper.pytest_make_collect_report.<locals>.sort_key  s   ø€ Ø—y‘y HÐ,Ð,rH   T©rm   Úreversec              3  ó:   •K  — | ]  }|j                   ‰v –— Œ y ­wrC   ©Únodeid)Ú.0ÚxÚ
lastfaileds     €r7   ú	<genexpr>zALFPluginCollWrapper.pytest_make_collect_report.<locals>.<genexpr>  s   øè ø€ ÒF¸!˜qŸx™x¨:Ô5ÑFùs   ƒzlfplugin-collskip)rŸ   znodes.Item | nodes.Collectorrˆ   r‡   )Ú
isinstancer   r   r™   Ú_last_failed_pathsÚsortedÚresultr   r3   r©   rš   ÚanyrF   ÚpluginmanagerÚregisterÚLFPluginCollSkipfilesÚsessionr¦   Ú
isinitpathr   Ú	Collector)	rD   Ú	collectorrk   r¡   r®   r³   r¨   r©   r    s	          @@r7   Úpytest_make_collect_reportz.LFPluginCollWrapper.pytest_make_collect_reportø   sD  ùè ø€ ò ˆÜ�i¤¬9Ñ!4Ô5à—}‘}×7Ñ7ˆHõ-ô  Ø—
‘
ØØôˆCŒJð> ˆ
ô3 ˜	¤4Õ(Ø�~‰~ §¡×!AÑ!AÑAØŸ™�Ø!Ÿ]™]×5Ñ5�
ð ×;Ò;ÜÓF¸vÔFÔFØ"˜
Ø—M‘M×(Ñ(×6Ñ6×?Ñ?Ü-¨d¯m©mÓ<Ð>Qôð <@�DÔ8à#×+Ñ+�ð $öàØ—x‘x :Ñ-à×)Ñ)¨!¯&©&Ô1ä! !¤U§_¡_Ô5ò ò�‘q�	ð ˆ
ùòùs   „D(FÄ,AF Å8FN©r™   ÚLFPluginrˆ   r‰   )r¶   únodes.Collectorrˆ   z-Generator[None, CollectReport, CollectReport]©r�   rŽ   r�   rG   r   r·   r\   rH   r7   r—   r—   ó   s0   „ ó5ñ �dÔð+Ø(ð+à	6ò+ó ñ+rH   r—   c                  ó.   — e Zd Zdd„Ze	 	 	 	 dd„«       Zy)r²   c                ó   — || _         y rC   )r™   r›   s     r7   rG   zLFPluginCollSkipfiles.__init__(  s	   € Ø ˆ�rH   c                óØ   — t        |t        «      rZ|j                  | j                  j                  vr8| j                  xj
                  dz  c_        t        |j                  dd g ¬«      S y )Nr   Úpassed)Úlongreprr®   )r«   r   r3   r™   r¬   Ú_skipped_filesr   r¦   )rD   r¶   s     r7   r·   z0LFPluginCollSkipfiles.pytest_make_collect_report+  sZ   € ô �i¤Ô&Ø�~‰~ T§]¡]×%EÑ%EÑEØ—‘×,Ò,°Ñ1Õ,ä$Ø×$Ñ$ h¸Àbôð ð rH   Nr¸   )r¶   rº   rˆ   zCollectReport | Noner»   r\   rH   r7   r²   r²   '  s+   „ ó!ð ð
Ø(ð
à	ò
ó ñ
rH   r²   c                  ón   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Z e	dd¬«      	 	 	 	 	 	 dd	„«       Z
dd
„Zy)r¹   z;Plugin which implements the --lf (run last-failing) option.c                ój  ‡— ‰| _         d}t        ˆfd„|D «       «      | _        ‰j                  sJ ‚‰j                  j	                  di «      | _        d | _        d | _        d| _        ‰j                  d«      r;| j                  «       | _        ‰j                  j                  t        | «      d«       y y )N)ÚlfÚfailedfirstc              3  ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wrC   )rL   )r§   rm   rF   s     €r7   rª   z$LFPlugin.__init__.<locals>.<genexpr>?  s   øè ø€ ÒG°C˜&×*Ñ*¨3×/ÑGùs   ƒúcache/lastfailedr   rÄ   zlfplugin-collwrapper)rF   r¯   ÚactiveÚcachery   r©   Ú_previously_failed_countÚ_report_statusrÁ   rL   Úget_last_failed_pathsr¬   r°   r±   r—   )rD   rF   Úactive_keyss    ` r7   rG   zLFPlugin.__init__<  s¢   ø€ ØˆŒØ)ˆÜÓG¸;ÔGÓGˆŒØ�|Š|Ðˆ|Ø+1¯<©<×+;Ñ+;Ð<NÐPRÓ+SˆŒØ48ˆÔ%Ø*.ˆÔØˆÔà×Ñ˜DÔ!Ø&*×&@Ñ&@Ó&BˆDÔ#Ø× Ñ ×)Ñ)Ü# DÓ)Ð+Aõð "rH   c                ó6  — | j                   j                  }t        «       }| j                  D ]E  }||j	                  d«      d   z  }|j                  |«       |j                  |j                  «       ŒG |D �ch c]  }|j                  «       sŒ|’Œ c}S c c}w )zWReturn a set with all Paths of the previously failed nodeids and
        their parents.z::r   )	rF   rW   r„   r©   ÚsplitÚaddÚupdater   Úexists)rD   rW   r®   r¦   r3   r¨   s         r7   rÌ   zLFPlugin.get_last_failed_pathsL  s   € ð —;‘;×'Ñ'ˆÜ“ˆØ—o‘oò 	(ˆFØ˜fŸl™l¨4Ó0°Ñ3Ñ3ˆDØ�J‰J�tÔØ�M‰M˜$Ÿ,™,Õ'ð	(ð "Ö0�a Q§X¡X¥Z’Ò0Ð0ùÒ0s   Á9BÂBc                ót   — | j                   r,| j                  j                  «       dk\  rd| j                  › �S y )Nr   zrun-last-failure: )rÈ   rF   Úget_verbosityrË   r†   s    r7   Úpytest_report_collectionfinishz'LFPlugin.pytest_report_collectionfinishW  s4   € Ø�;Š;˜4Ÿ;™;×4Ñ4Ó6¸!Ò;Ø'¨×(;Ñ(;Ð'<Ð=Ð=ØrH   c                óì   — |j                   dk(  r|j                  s|j                  r'| j                  j	                  |j
                  d «       y |j                  rd| j                  |j
                  <   y y )NÚcallT)Úwhenr¿   Úskippedr©   Úpopr¦   Úfailed)rD   Úreports     r7   Úpytest_runtest_logreportz!LFPlugin.pytest_runtest_logreport\  sP   € Ø�K‰K˜6Ò! f§m¢m¸¿ºØ�O‰O×Ñ §¡¨tÕ4Ø�]Š]Ø-1ˆD�O‰O˜FŸM™MÒ*ð rH   c                ó,  — |j                   dv }|rk|j                  | j                  v rR| j                  j                  |j                  «       | j                  j	                  d„ |j
                  D «       «       y y d| j                  |j                  <   y )N)r¿   rÙ   c              3  ó8   K  — | ]  }|j                   d f–— Œ y­w)TNr¥   ©r§   Úitems     r7   rª   z0LFPlugin.pytest_collectreport.<locals>.<genexpr>g  s   è ø€ Ò&U¸t¨¯©°TÔ':Ñ&Uùs   ‚T)Úoutcomer¦   r©   rÚ   rÑ   r®   )rD   rÜ   r¿   s      r7   Úpytest_collectreportzLFPlugin.pytest_collectreportb  so   € Ø—‘Ð#8Ð8ˆÙØ�}‰} §¡Ñ/Ø—‘×#Ñ# F§M¡MÔ2Ø—‘×&Ñ&Ñ&UÀvÇ}Á}Ô&UÕUð 0ð .2ˆD�O‰O˜FŸM™MÒ*rH   T©rœ   Útryfirstc              #  óÖ  K  — d –—}| j                   s|S | j                  �rPg }g }|D ]=  }|j                  | j                  v r|j                  |«       Œ-|j                  |«       Œ? t	        |«      | _        |st	        | j                  «      › d�| _        n�| j                  j                  d«      r"||d d  |j                  j                  |¬«       n||z   |d d  | j
                  dk(  rdnd}| j                  j                  d«      rdnd	}d
| j
                  › d|› |› �| _        | j                  dkD  r9| j                  dk(  rdnd}	| xj                  d| j                  › d|	› d�z  c_        |S d| _        | j                  j                  d«      dk(  r;| xj                  dz  c_        |j                  j                  |d d  ¬«       g |d d  |S | xj                  dz  c_        |S ­w)Nz% known failures not in selected testsrÄ   )r(   r   ÚfailureÚfailuresrÅ   z firstÚ zrerun previous ú r   ÚfileÚfilesz
 (skipped ú)zno previously failed tests, Úlast_failed_no_failuresÚnonezdeselecting all items.znot deselecting items.)rÈ   r©   r¦   Úappendrh   rÊ   rË   rF   rL   ra   Úpytest_deselectedrÁ   )
rD   rF   r(   rk   Úpreviously_failedÚpreviously_passedrá   ÚnounÚsuffixÚ
files_nouns
             r7   Úpytest_collection_modifyitemsz&LFPlugin.pytest_collection_modifyitemsk  sô  è ø€ ò ˆà�{Š{ØˆJà�?‹?Ø "ÐØ "ÐØò 3�Ø—;‘; $§/¡/Ñ1Ø%×,Ñ,¨TÕ2à%×,Ñ,¨TÕ2ð	3ô
 -0Ð0AÓ,BˆDÔ)á$ô ˜4Ÿ?™?Ó+Ð,Ð,QÐRð Õ#ð —;‘;×(Ñ(¨Ô.Ø0�E™!�HØ—K‘K×1Ñ1Ð8IÐ1ÕJà0Ð3DÑD�E™!�Hà$(×$AÑ$AÀQÒ$F‘yÈJ�Ø%)§[¡[×%:Ñ%:¸=Ô%I™Èr�à% d×&CÑ&CÐ%DÀAÀdÀVÈFÈ8ÐTð Ô#ð ×"Ñ" QÒ&Ø'+×':Ñ':¸aÒ'?™VÀW�
Ø×#Ò#¨°D×4GÑ4GÐ3HÈÈ*ÈÐUVÐ'WÑWÕ#ð ˆ
ð #AˆDÔØ�{‰{×$Ñ$Ð%>Ó?À6ÒIØ×#Ò#Ð'?Ñ?Õ#Ø—‘×-Ñ-°E¹!°HÐ-Ô=Ø�‘a�ð ˆ
ð ×#Ò#Ð'?Ñ?Õ#àˆ
ùs   ‚G'G)c                ó  — | j                   }|j                  d«      st        |d«      ry |j                  €J ‚|j                  j	                  di «      }|| j
                  k7  r'|j                  j                  d| j
                  «       y y )NÚ	cacheshowÚworkerinputrÇ   )rF   rL   ÚhasattrrÉ   ry   r©   r„   )rD   r³   rF   Úsaved_lastfaileds       r7   Úpytest_sessionfinishzLFPlugin.pytest_sessionfinishŸ  sw   € Ø—‘ˆØ×Ñ˜KÔ(¬G°F¸MÔ,JØà�|‰|Ð'Ð'Ð'Ø!Ÿ<™<×+Ñ+Ð,>ÀÓCÐØ˜tŸ™Ò.Ø�L‰L×ÑÐ/°·±ÕAð /rH   N©rF   r   rˆ   r‰   )rˆ   z	set[Path])rˆ   ú
str | None)rÜ   r   rˆ   r‰   )rÜ   r   rˆ   r‰   )rF   r   r(   úlist[nodes.Item]rˆ   úGenerator[None])r³   r   rˆ   r‰   )r�   rŽ   r�   r�   rG   rÌ   rÕ   rÝ   rã   r   r÷   rý   r\   rH   r7   r¹   r¹   9  sX   „ ÙEóó 	1óó
2ó2ñ �d TÔ*ð1Øð1Ø%5ð1à	ò1ó +ð1ôfBrH   r¹   c                  óJ   — e Zd ZdZd	d„Z edd¬«      d
d„«       Zdd„Zdd„Zy)ÚNFPluginz8Plugin which implements the --nf (run new-first) option.c                ó¸   — || _         |j                  j                  | _        |j                  €J ‚t        |j                  j                  dg «      «      | _        y )Núcache/nodeids)rF   ÚoptionÚnewfirstrÈ   rÉ   r„   ry   Úcached_nodeids©rD   rF   s     r7   rG   zNFPlugin.__init__­  sH   € ØˆŒØ—m‘m×,Ñ,ˆŒØ�|‰|Ð'Ð'Ð'Ü! &§,¡,×"2Ñ"2°?ÀBÓ"GÓHˆÕrH   Trä   c              #  ó´  K  — d –—}| j                   r¡i }i }|D ]9  }|j                  | j                  vr|||j                  <   Œ+|||j                  <   Œ; | j                  |j	                  «       «      | j                  |j	                  «       «      z   |d d  | j                  j                  |«       |S | j                  j                  d„ |D «       «       |S ­w)Nc              3  ó4   K  — | ]  }|j                   –— Œ y ­wrC   r¥   rà   s     r7   rª   z9NFPlugin.pytest_collection_modifyitems.<locals>.<genexpr>Å  s   è ø€ Ò&E°t t§{¥{Ñ&Eùs   ‚)rÈ   r¦   r  Ú_get_increasing_orderÚvaluesrÑ   )rD   r(   rk   Ú	new_itemsÚother_itemsrá   s         r7   r÷   z&NFPlugin.pytest_collection_modifyitems³  sÖ   è ø€ âˆà�;Š;Ø/1ˆIØ13ˆKØò 4�Ø—;‘; d×&9Ñ&9Ñ9Ø-1�I˜dŸk™kÒ*à/3�K §¡Ò,ð	4ð ×1Ñ1Ø× Ñ Ó"óà×*Ñ*¨;×+=Ñ+=Ó+?Ó@ñAˆE‘!ˆHð ×Ñ×&Ñ& yÔ1ð ˆ
ð ×Ñ×&Ñ&Ñ&E¸uÔ&EÔEàˆ
ùs   ‚CCc                ó    — t        |d„ d¬«      S )Nc                óJ   — | j                   j                  «       j                  S rC   )r3   ÚstatÚst_mtime)rá   s    r7   ú<lambda>z0NFPlugin._get_increasing_order.<locals>.<lambda>Ê  s   € ¨d¯i©i¯n©nÓ.>×.GÑ.G€ rH   Tr¢   )r­   )rD   r(   s     r7   r  zNFPlugin._get_increasing_orderÉ  s   € Ü�eÑ!GÐQUÔVÐVrH   c                óö   — | j                   }|j                  d«      st        |d«      ry |j                  d«      ry |j                  €J ‚|j                  j	                  dt        | j                  «      «       y )Nrù   rú   Úcollectonlyr  )rF   rL   rû   rÉ   r„   r­   r  r	  s     r7   rý   zNFPlugin.pytest_sessionfinishÌ  se   € Ø—‘ˆØ×Ñ˜KÔ(¬G°F¸MÔ,JØà×Ñ˜MÔ*Øà�|‰|Ð'Ð'Ð'Ø�‰×Ñ˜¬&°×1DÑ1DÓ*EÕFrH   Nrþ   )r(   r   rˆ   r  )r(   zIterable[nodes.Item]rˆ   r   rŒ   )	r�   rŽ   r�   r�   rG   r   r÷   r  rý   r\   rH   r7   r  r  ª  s2   „ ÙBóIñ �d TÔ*òó +ðó*Wô	GrH   r  c           	     óâ  — | j                  d«      }|j                  ddddd¬«       |j                  dd	dd
d¬«       |j                  ddddd¬«       |j                  ddddd¬«       |j                  dddd¬«       d}dt        j                  v r1t        j                  j                  t        j                  d   |«      }| j                  d|d¬«       |j                  ddd d!d"d#d$¬%«       y&)'zxAdd command-line options for cache functionality.

    :param parser: Parser object to add command-line options to.
    Úgeneralz--lfz--last-failedÚ
store_truerÄ   zHRerun only the tests that failed at the last run (or all if none failed))ÚactionÚdestÚhelpz--ffz--failed-firstrÅ   zyRun all tests, but run the last failures first. This may re-order tests and thus lead to repeated fixture setup/teardown.z--nfz--new-firstr  zORun tests from new files first, then the rest of the tests sorted by file mtimez--cache-showrð   ú?rù   z_Show cache contents, don't perform collection or tests. Optional argument: glob (default: '*').)r  Únargsr  r  z--cache-clearrJ   z.Remove all cache contents at start of test runú.pytest_cacheÚTOX_ENV_DIRrU   zCache directory path)rw   r  z--lfnfz--last-failed-no-failuresÚstorerî   )Úallrï   r"  a  With ``--lf``, determines whether to execute tests when there are no previously (known) failures or when no cached ``lastfailed`` data was found. ``all`` (the default) runs the full test suite again. ``none`` just emits a message about no known failures and exits successfully.)r  r  Úchoicesrw   r  N)ÚgetgroupÚ	addoptionr%   Úenvironr3   ÚjoinÚaddini)ÚparserÚgroupÚcache_dir_defaults      r7   Úpytest_addoptionr,  Ø  s-  € ð
 �O‰O˜IÓ&€EØ	‡O�OØØØØØWð ô ð 
‡O�OØØØØð+ð ô ð 
‡O�OØØØØðð ô ð 
‡O�OØØØØð6ð ô 	ð 
‡O�OØØØØ=ð	 ô ð (ÐØœŸ
™
Ñ"ÜŸG™GŸL™L¬¯©°MÑ)BÐDUÓVÐØ
‡M�M�+Ð'8Ð?U€MÔVØ	‡O�OØØ#ØØ&ØØðXð õ rH   c                ó‚   — | j                   j                  r)| j                   j                  sddlm}  || t        «      S y )Nr   )Úwrap_session)r  rù   r  Ú_pytest.mainr.  )rF   r.  s     r7   Úpytest_cmdline_mainr0    s.   € Ø‡}�}×Ò v§}¡}×'9Ò'9Ý-á˜F¤IÓ.Ð.ØrH   T)rå   c                óÐ   — t         j                  | d¬«      | _        | j                  j	                  t        | «      d«       | j                  j	                  t        | «      d«       y)zñConfigure cache system and register related plugins.

    Creates the Cache instance and registers the last-failed (LFPlugin)
    and new-first (NFPlugin) plugins with the plugin manager.

    :param config: pytest configuration object.
    Tr@   r™   ÚnfpluginN)r:   rP   rÉ   r°   r±   r¹   r  )rF   s    r7   Úpytest_configurer3  !  sQ   € ô ×#Ñ# F°dÐ#Ó;€F„LØ
×Ñ×!Ñ!¤(¨6Ó"2°JÔ?Ø
×Ñ×!Ñ!¤(¨6Ó"2°JÕ?rH   c                ó^   — | j                   j                  €J ‚| j                   j                  S )ab  Return a cache object that can persist state between testing sessions.

    cache.get(key, default)
    cache.set(key, value)

    Keys must be ``/`` separated strings, where the first part is usually the
    name of your plugin or application to avoid clashes with other cache users.

    Values can be any object handled by the json stdlib module.
    )rF   rÉ   )Úrequests    r7   rÉ   rÉ   /  s*   € ð �>‰>×ÑÐ+Ð+Ð+Ø�>‰>×ÑÐrH   c                ó
  — | j                   j                  dkD  s| j                  d«      dk7  rE| j                  €J ‚| j                  j                  }	 |j                  | j                  «      }d|› �S y# t        $ r |}Y Œw xY w)z6Display cachedir with --cache-show and if non-default.r   rU   r  Nú
cachedir: )r  ÚverboserV   rÉ   r<   Úrelative_torW   rj   )rF   rE   Údisplaypaths      r7   Úpytest_report_headerr;  ?  s„   € à‡}�}×Ñ˜qÒ  F§M¡M°+Ó$>À/Ò$QØ�|‰|Ð'Ð'Ð'Ø—<‘<×)Ñ)ˆð	#Ø"×.Ñ.¨v¯©Ó?ˆKð ˜K˜=Ð)Ð)Øøô ò 	#Ø"ŠKð	#ús   ÁA4 Á4BÂBc                ó¬  — ddl m} | j                  €J ‚t        «       }|j	                  dt        | j                  j                  «      z   «       | j                  j                  j                  «       s|j	                  d«       y| j                  j                  d   }|€d}t        «       }| j                  j                  }|t        j                  z  }|j                  dd|›�«       t        d„ |j                  |«      D «       «      D ]”  }t        |j!                  |«      «      }	| j                  j#                  |	|«      }
|
|u r|j	                  |	› d	�«       ŒR|j	                  |	› d
�«        ||
«      j%                  «       D ]  }|j	                  d|z   «       Œ Œ– |t        j&                  z  }|j                  «       r�t        |j                  |«      «      }|j                  dd|›�«       |D ][  }|j)                  «       sŒt        |j!                  |«      «      }	|j	                  |	› d|j+                  «       j,                  › �«       Œ] y)a}  Display cache contents when --cache-show is used.

    Shows cached values and directories matching the specified glob pattern
    (default: '*'). Displays cache location, cached test results, and
    any cached directories created by plugins.

    :param config: pytest configuration object.
    :param session: pytest session object.
    :returns: Exit code (0 for success).
    r   )Úpformatr7  zcache is emptyÚ*ú-zcache values for c              3  óB   K  — | ]  }|j                  «       sŒ|–— Œ y ­wrC   )Úis_file)r§   r¨   s     r7   rª   zcacheshow.<locals>.<genexpr>l  s   è ø€ ÒE ¸¿¹½œ!ÑEùs   ‚˜z- contains unreadable content, will be ignoredz
 contains:z  zcache directories for z is a file of length )Úpprintr=  rÉ   r   ÚlinerŠ   r<   rM   r  rù   r‹   r:   rS   Úsepr­   Úrglobr9  ry   Ú
splitlinesrR   rA  r  Úst_size)rF   r³   r=  ÚtwÚglobÚdummyÚbasedirÚvdirÚvalpathrm   ÚvalrC  ÚddirÚcontentsÚps                  r7   rù   rù   O  s  € õ à�<‰<Ð#Ð#Ð#ä	Ó	€BØ‡G�GˆLœ3˜vŸ|™|×5Ñ5Ó6Ñ6Ô7Ø�<‰<×!Ñ!×(Ñ(Ô*Ø
�‰Ð Ô!Øà�=‰=×"Ñ" 1Ñ%€DØ€|Øˆä‹H€EØ�l‰l×$Ñ$€GØ”U×/Ñ/Ñ/€DØ‡F�Fˆ3Ð# D 8Ð,Ô-ÜÑE T§Z¡Z°Ó%5ÔEÓEò %ˆÜ�'×%Ñ% dÓ+Ó,ˆØ�l‰l×Ñ˜s EÓ*ˆØ�%‰<Ø�G‰G�s�eÐHÐIÕJà�G‰G�s�e˜:Ð&Ô'Ù ›×/Ñ/Ó1ò %�Ø—‘˜˜t™Õ$ñ%ð%ð ”U×-Ñ-Ñ-€DØ‡{�{„}Ü˜$Ÿ*™* TÓ*Ó+ˆØ
�‰ˆsÐ,¨T¨HÐ5Ô6Øò 	IˆAð �y‰y�{Ü˜!Ÿ-™-¨Ó0Ó1�Ø—‘˜3˜%Ð4°Q·V±V³X×5EÑ5EÐ4FÐGÕHð	Ið rH   )r2   r   rˆ   r‰   )r)  r   rˆ   r‰   )rF   r   rˆ   zint | ExitCode | Nonerþ   )r5  r   rˆ   r:   )rF   r   rˆ   rÿ   )rF   r   r³   r   rˆ   Úint)9r�   Ú
__future__r   Úcollections.abcr   r   r‘   r-   ru   r%   Úpathlibr   r0   r#   Útypingr   r	   r
   Úreportsr   Ú_pytestr   Ú_pytest._ior   Ú_pytest.configr   r   r   Ú_pytest.config.argparsingr   Ú_pytest.deprecatedr   Ú_pytest.fixturesr   r   r/  r   Ú_pytest.nodesr   r   Ú_pytest.reportsr   r   r“   r8   Ú	dataclassr:   r—   r²   r¹   r  r,  r0  r3  rÉ   r;  rù   r\   rH   r7   ú<module>ra     s  ðâ +õ #å %Ý $Û Û Û Û 	Ý Û Û Ý å %Ý Ý "Ý Ý &Ý !Ý #Ý #Ý ,Ý -Ý $Ý +Ý  Ý #Ý Ý &ð	ð =ðñ$€Ð ó ó*0ð> Ø×Ñ÷U+ð U+ó ó ðU+÷p1ñ 1÷hñ ÷$nBñ nB÷b+Gñ +Gó\>óBñ 
�4Ôò
@ó ð
@ð 	ò ó 	ð óô 1rH   