Ë
    •Kêj[,  ã                  ó\  — 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	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l m!Z! ddl"m#Z# erddl$m%Z% g d¢Z& e#edz     «       Z'dddœ	 	 	 	 	 	 	 d2d„Z(d3d „Z) ed!¬"«      d4d#„«       Z* e+d$d%h«      Z,d5d&„Z-e	j\                   G d'„ d(«      «       Z/d6d)„Z0e	j\                   G d*„ d+«      «       Z1d6d,„Z2d7d-„Z3d8d.„Z4d6d/„Z5d9d0„Z6d9d1„Z7y):z=Generic mechanism for marking and selecting python functions.é    )ÚannotationsN)Ú
Collection)ÚIterable)ÚSet)ÚTYPE_CHECKINGé   )Ú
Expression)Ú_EmptyParameterSetMark)Ú_HiddenParam)ÚEMPTY_PARAMETERSET_OPTION)Úget_empty_parameterset_mark)ÚHIDDEN_PARAM)ÚMark)ÚMARK_GEN)ÚMarkDecorator)ÚMarkGenerator)ÚParameterSet)ÚNOTSET)ÚConfig)ÚExitCode)Úhookimpl)Ú
UsageError)ÚParser)ÚStashKey)ÚItem)r   r   r   r   r   r   r   © ©ÚmarksÚidc                ó.   — t        j                  || |dœŽS )a$  Specify a parameter in `pytest.mark.parametrize`_ calls or
    :ref:`parametrized fixtures <fixture-parametrize-marks>`.

    .. code-block:: python

        @pytest.mark.parametrize(
            "test_input,expected",
            [
                ("3+5", 8),
                pytest.param("6*9", 42, marks=pytest.mark.xfail),
            ],
        )
        def test_eval(test_input, expected):
            assert eval(test_input) == expected

    :param values: Variable args of the values of the parameter set, in order.

    :param marks:
        A single mark or a list of marks to be applied to this parameter set.

        :ref:`pytest.mark.usefixtures <pytest.mark.usefixtures ref>` cannot be added via this parameter.

    :type id: str | Literal[pytest.HIDDEN_PARAM] | None
    :param id:
        The id to attribute to this parameter set.

        .. versionadded:: 8.4
            :ref:`hidden-param` means to hide the parameter set
            from the test name. Can only be used at most 1 time, as
            test names need to be unique.
    r   )r   Úparam)r   r   Úvaluess      úZ/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/_pytest/mark/__init__.pyr!   r!   2   s   € ôH ×Ñ˜v¨U°rÒ:Ð:ó    c                ó
  — | j                  d«      }|j                  dddddd¬«       |j                  d	dd
ddd¬«       |j                  ddd¬«       | j                  ddd«       | j                  t        dt
        d¬«       y )NÚgeneralz-kÚstoreÚkeywordÚ Ú
EXPRESSIONa  Only run tests matching the given keyword expression, e.g. -k 'test_method or test_other', -k 'not (slow or network)'.
Names in the expression are matched case-insensitively as substrings of the test's keywords, which are:
- its own name, including any parametrization id
- the names of its class, module and directories
- the names of the markers applied to it or to its parents
- attributes assigned directly to the test function
- any names in its 'extra_keyword_matches' set
Use -m to match marker names exactly, including their arguments.)ÚactionÚdestÚdefaultÚmetavarÚhelpz-mÚmarkexprÚMARKEXPRzUOnly run tests matching given mark expression. For example: -m 'mark1 and not mark2'.z	--markersÚ
store_truez4show markers (builtin, plugin and per-project ones).)r+   r/   Úmarkersz'Register new markers for test functionsÚlinelistz&Default marker for empty parametersetsÚskip)Útyper-   )ÚgetgroupÚ
_addoptionÚ	addoptionÚaddinir   r
   )ÚparserÚgroups     r#   Úpytest_addoptionr=   Y   s­   € Ø�O‰O˜IÓ&€EØ	×ÑØØØØØð	Kð ô ð$ 
×ÑØØØØØð1ð ô ð 
‡O�OØØØCð ô ð ‡M�M�)ÐFÈ
ÔSØ
‡M�MÜ!Ø0Ü#Øð	 õ r$   T)Útryfirstc                ó”  — dd l }| j                  j                  r®| j                  «        |j                  j                  | «      }| j                  «       D ]_  }|j                  d|j                  › d�d¬«       |j                  |j                  rd|j                  › �nd«       |j                  «        Œa | j                  «        yy )Nr   z@pytest.mark.ú:T)Úboldú r)   )Ú_pytest.configÚoptionr3   Ú_do_configureÚconfigÚcreate_terminal_writerÚ_iter_registered_markersÚwriteÚ	signatureÚlineÚdescriptionÚ_ensure_unconfigure)rF   Ú_pytestÚtwÚmarkers       r#   Úpytest_cmdline_mainrQ   †   s«   € ãà‡}�}×ÒØ×ÑÔØ�^‰^×2Ñ2°6Ó:ˆØ×5Ñ5Ó7ò 	ˆFØ�H‰H�} V×%5Ñ%5Ð$6°aÐ8¸tˆHÔDØ�G‰G°×0BÒ0B�a˜×*Ñ*Ð+Ñ,ÈÔKØ�G‰G�Ið	ð 	×"Ñ"Ô$Øàr$   Ú
pytestmarkÚcache_parametersc                ó:   — | j                  d«       xr | t        vS )z;Whether a test function attribute may be matched by ``-k``.Ú_)Ú
startswithÚIGNORED_FUNCTION_ATTRIBUTES©Únames    r#   Ú _is_matchable_function_attributerZ   ž   s   € à�‰˜sÓ#Ð#ÒO¨Ô4OÐ(OÐOr$   c                  ó:   — e Zd ZU dZdZded<   edd„«       Zd	d„Zy)
ÚKeywordMatcheraT  A matcher for keywords, as used by ``-k``.

    Given a set of names, matches any substring of one of these names. The
    string inclusion check is case-insensitive.

    The names are collected in :meth:`from_item` from the item and its
    parents: their node names, the names of the markers in scope, the
    attributes assigned to the test function, and the
    :attr:`~_pytest.nodes.Node.extra_keyword_matches` sets.

    Note that these names are collected independently of
    :attr:`Node.keywords <_pytest.nodes.Node.keywords>`; writing into that
    mapping does not affect ``-k``.
    )Ú_nameszAbstractSet[str]r]   c                ó  — t        «       }dd l}|j                  «       D ]k  }t        ||j                  «      rŒt        ||j
                  «      r!t        |j                  |j                  «      rŒQ|j                  |j                  «       Œm |j                  |j                  «       «       t        |dd «      }|r"|j                  d„ |j                  D «       «       |j                  d„ |j                  «       D «       «        | |«      S )Nr   Úfunctionc              3  ó6   K  — | ]  }t        |«      r|–— Œ y ­w©N)rZ   )Ú.0rY   s     r#   ú	<genexpr>z+KeywordMatcher.from_item.<locals>.<genexpr>Ò   s    è ø€ ò  àÜ3°DÔ9ô ñ ùs   ‚c              3  ó4   K  — | ]  }|j                   –— Œ y ­wra   rX   )rb   Úmarks     r#   rc   z+KeywordMatcher.from_item.<locals>.<genexpr>Ù   s   è ø€ ÒF¨$˜DŸI�IÑFùs   ‚)ÚsetÚpytestÚ	listchainÚ
isinstanceÚSessionÚ	DirectoryÚparentÚaddrY   ÚupdateÚlistextrakeywordsÚgetattrÚ__dict__Úiter_markers)ÚclsÚitemÚmapped_namesrg   ÚnodeÚfunction_objs         r#   Ú	from_itemzKeywordMatcher.from_item¸   sç   € ä“uˆó
 	à—N‘NÓ$ò 	(ˆDÜ˜$ §¡Ô/ØÜ˜$ × 0Ñ 0Ô1´jØ—‘˜VŸ^™^ô7ð Ø×Ñ˜TŸY™YÕ'ð	(ð 	×Ñ˜D×2Ñ2Ó4Ô5ô
 ˜t Z°Ó6ˆÙØ×Ññ  à(×1Ñ1ô ô ð 	×ÑÑF°$×2CÑ2CÓ2EÔFÔFá�<Ó Ð r$   c               óz   ‡— |rt        d«      ‚‰j                  «       Št        ˆfd„| j                  D «       «      S )Nz3Keyword expressions do not support call parameters.c              3  óB   •K  — | ]  }‰|j                  «       v –— Œ y ­wra   )Úlower)rb   rY   Úsubnames     €r#   rc   z*KeywordMatcher.__call__.<locals>.<genexpr>á   s   øè ø€ ÒC¨t�7˜dŸj™j›lÔ*ÑCùs   ƒ)r   r{   Úanyr]   )Úselfr|   Úkwargss    ` r#   Ú__call__zKeywordMatcher.__call__Ý   s2   ø€ ÙÜÐRÓSÐSØ—-‘-“/ˆÜÓC°t·{±{ÔCÓCÐCr$   N)rt   r   Úreturnr\   )r|   Ústrr   ústr | int | bool | Noner�   Úbool)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Ú__annotations__Úclassmethodrx   r€   r   r$   r#   r\   r\   £   s-   … ñð €IàÓàò"!ó ð"!ôHDr$   r\   c                óV  — |j                   j                  j                  «       }|sy t        |d«      }g }g }| D ]I  }|j	                  t
        j                  |«      «      s|j                  |«       Œ9|j                  |«       ŒK |r"|j                  j                  |¬«       || d d  y y )NzWrong expression passed to '-k'©Úitems)
rD   r(   ÚlstripÚ_parse_expressionÚevaluater\   rx   ÚappendÚhookÚpytest_deselected)rŽ   rF   ÚkeywordexprÚexprÚ	remainingÚ
deselectedÚcolitems          r#   Údeselect_by_keywordrš   ä   s¡   € Ø—-‘-×'Ñ'×.Ñ.Ó0€KÙØä˜[Ð*KÓL€Dà€IØ€JØò &ˆØ�}‰}œ^×5Ñ5°gÓ>Ô?Ø×Ñ˜gÕ&à×Ñ˜WÕ%ð	&ñ Ø�‰×%Ñ%¨JÐ%Ô7Øˆ‰a‰ð r$   c                  ó:   — e Zd ZU dZdZded<   edd„«       Zd	d„Zy)
ÚMarkMatcherzuA matcher for markers which are present.

    Tries to match on any marker names, attached to the given colitem.
    )Úown_mark_name_mappingzdict[str, list[Mark]]r�   c                óŽ   — t        j                  t        «      }|D ]   }||j                     j	                  |«       Œ"  | |«      S ra   )ÚcollectionsÚdefaultdictÚlistrY   r’   )rs   r3   Úmark_name_mappingre   s       r#   Úfrom_markerszMarkMatcher.from_markers  sE   € ä'×3Ñ3´DÓ9ÐØò 	6ˆDØ˜dŸi™iÑ(×/Ñ/°Õ5ð	6áÐ$Ó%Ð%r$   c               óš   ‡— | j                   j                  |g «      x}sy|D ]&  Št        ˆfd„|j                  «       D «       «      sŒ& y y)NFc              3  ój   •K  — | ]*  \  }}‰j                   j                  |t        «      |k(  –— Œ, y ­wra   )r   Úgetr   )rb   ÚkÚvre   s      €r#   rc   z'MarkMatcher.__call__.<locals>.<genexpr>  s)   øè ø€ ÒN±t°q¸!�4—;‘;—?‘? 1¤fÓ-°Õ2ÑNùs   ƒ03T)r�   r¦   ÚallrŽ   )r~   rY   r   Úmatchesre   s       @r#   r€   zMarkMatcher.__call__
  sO   ø€ Ø×5Ñ5×9Ñ9¸$ÀÓCÐC�ÐCØàò 	ˆDÜÓN¸v¿|¹|»~ÔNÕNÙð	ð r$   N)r3   zIterable[Mark]r�   rœ   )rY   r‚   r   rƒ   r�   r„   )	r…   r†   r‡   rˆ   r‰   rŠ   r‹   r£   r€   r   r$   r#   rœ   rœ   ø   s+   … ñð
 +€Ià0Ó0àò&ó ð&ôr$   rœ   c                ón  — |j                   j                  }|sy t        |d«      }t        ||«       g }g }| D ]W  }|j	                  t
        j                  |j                  «       «      «      r|j                  |«       ŒG|j                  |«       ŒY |r"|j                  j                  |¬«       || d d  y y )NzWrong expression passed to '-m'r�   )rD   r0   r�   Ú_validate_marker_namesr‘   rœ   r£   rr   r’   r“   r”   )rŽ   rF   Ú	matchexprr–   r—   r˜   rt   s          r#   Údeselect_by_markr®     s«   € Ø—‘×&Ñ&€IÙØä˜YÐ(IÓJ€DÜ˜4 Ô(à€IØ€JØò $ˆØ�=‰=œ×1Ñ1°$×2CÑ2CÓ2EÓFÔGØ×Ñ˜TÕ"à×Ñ˜dÕ#ð	$ñ
 Ø�‰×%Ñ%¨JÐ%Ô7Øˆ‰a‰ð r$   c                ó&  — |j                  d«      }|€|j                  d«      }|sy|j                  «       D �ch c]  }|j                  ’Œ }}| j                  «       |z
  }|r)dj	                  t        |«      «      }t        d|› d�«      ‚yc c}w )zyValidate that all marker names in the expression are registered.

    Only validates when strict_markers is enabled.
    Ústrict_markersNÚstrictz, z&Unknown marker(s) in '-m' expression: z2. Use 'pytest --markers' to see available markers.)ÚgetinirH   rY   ÚidentsÚjoinÚsortedr   )r–   rF   r°   ÚmÚregistered_markersÚunknown_markersÚunknown_strs          r#   r¬   r¬   (  sŸ   € ð
 —]‘]Ð#3Ó4€NØÐØŸ™ xÓ0ˆÙØà*0×*IÑ*IÓ*KÖL Q˜!Ÿ&›&ÐLÐÐLà—k‘k“mÐ&8Ñ8€OÙØ—i‘i¤ Ó 7Ó8ˆÜØ4°[°Mð B?ð ?ó
ð 	
ð ùò Ms   ºBc           
     óº   — 	 t        j                  | «      S # t        $ r:}t        |› d|j                  › d|j
                  › d|j                  › �«      d ‚d }~ww xY w)Nz: z: at column )r	   ÚcompileÚSyntaxErrorr   ÚtextÚoffsetÚmsg)r–   Úexc_messageÚes      r#   r�   r�   >  s^   € ðÜ×!Ñ! $Ó'Ð'øÜò ÜØˆm˜2˜aŸf™f˜X \°!·(±(°¸2¸a¿e¹e¸WÐEó
àð	ûðús   ‚ —	A 5AÁAc                ó4   — t        | |«       t        | |«       y ra   )rš   r®   )rŽ   rF   s     r#   Úpytest_collection_modifyitemsrÃ   G  s   € Ü˜˜vÔ&Ü�U˜FÕ#r$   c                ó†   — t         j                  | j                  t        <   | t         _        | j	                  t
        «       y ra   )r   Ú_configÚstashÚold_mark_config_keyr²   r   ©rF   s    r#   Úpytest_configurerÉ   L  s.   € Ü(0×(8Ñ(8€F‡L�LÔ$Ñ%Ø„HÔð ‡M�MÔ+Õ,r$   c                óV   — | j                   j                  t        d «      t        _        y ra   )rÆ   r¦   rÇ   r   rÅ   rÈ   s    r#   Úpytest_unconfigurerË   T  s   € Ø—|‘|×'Ñ'Ô(;¸TÓB„HÕr$   )r"   Úobjectr   z0MarkDecorator | Collection[MarkDecorator | Mark]r   zstr | _HiddenParam | Noner�   r   )r;   r   r�   ÚNone)rF   r   r�   zint | ExitCode | None)rY   r‚   r�   r„   )rŽ   z
list[Item]rF   r   r�   rÍ   )r–   r	   rF   r   r�   rÍ   )r–   r‚   rÀ   r‚   r�   r	   )rF   r   r�   rÍ   )8rˆ   Ú
__future__r   rŸ   Úcollections.abcr   r   r   ÚAbstractSetÚdataclassesÚtypingr   Ú
expressionr	   Ú
structuresr
   r   r   r   r   r   r   r   r   r   Ú_pytest.compatr   rC   r   r   r   r   Ú_pytest.config.argparsingr   Ú_pytest.stashr   Ú_pytest.nodesr   Ú__all__rÇ   r!   r=   rQ   Ú	frozensetrW   rZ   Ú	dataclassr\   rš   rœ   r®   r¬   r�   rÃ   rÉ   rË   r   r$   r#   ú<module>rÜ      sI  ðÙ Cå "ã Ý &Ý $Ý .Û Ý  å "Ý .Ý $Ý 1Ý 3Ý $Ý Ý  Ý %Ý %Ý $Ý !Ý !Ý #Ý #Ý %Ý ,Ý "ñ Ý"ò€ð .�h˜v¨™}Ñ-Ó/Ð ð
 ?AØ$(ñ$;Øð$;à;ð$;ð 	"ð$;ð ó	$;óN*ñZ 
�4Ôòó ðñ( (¨Ð7IÐ(JÓKÐ óPð
 ×Ñ÷=Dð =Dó ð=Dó@ð( ×Ñ÷ð ó ðó6ó(
ó,ó$ó
-ôCr$   