
    i&                    \   S r SSKJr  SSKrSSKJr  SSKJr  SSKJr  SSK	r	SSK
Jr  SSK
Jr  S	S
KJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  S	SKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ r   SSKJ!r!  SSK"J#r#  \(       a  SSK$J%r%  / SQr&\#\\      " 5       r'SSS.       S/S  jjr(S0S! jr)\" S"S#9S1S$ j5       r*\	RV                   " S% S&5      5       r,S2S' jr-\	RV                   " S( S)5      5       r.S2S* jr/S3S+ jr0S2S, jr1S4S- jr2S4S. jr3g)5z=Generic mechanism for marking and selecting python functions.    )annotationsN)
Collection)Iterable)Set)Optional)TYPE_CHECKING   )
Expression)
ParseError)_HiddenParam)EMPTY_PARAMETERSET_OPTION)get_empty_parameterset_mark)HIDDEN_PARAM)Mark)MARK_GEN)MarkDecorator)MarkGenerator)ParameterSet)Config)ExitCode)hookimpl)
UsageError)NOT_SET)Parser)StashKey)Item)r   r   r   r   r   r   r    marksidc                .    [         R                  " X US.6$ )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      T/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/_pytest/mark/__init__.pyr"   r"   3   s    H vr::    c           	         U R                  S5      nUR                  SSSSSSS9  UR                  S	SS
SSSS9  UR                  SSSS9  U R                  SSS5        U R                  [        S5        g )Ngeneralz-kstorekeyword 
EXPRESSIONa  Only run tests which match the given substring expression. An expression is a Python evaluable expression where all names are substring-matched against test names and their parent classes. Example: -k 'test_method or test_other' matches all test functions and classes whose name contains 'test_method' or 'test_other', while -k 'not test_method' matches those that don't contain 'test_method' in their names. -k 'not test_method and not test_other' will eliminate the matches. Additionally keywords are matched to classes and functions containing extra names in their 'extra_keyword_matches' set, as well as functions which have names assigned directly to them. The matching is case-insensitive.)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,   r0   markersz'Register new markers for test functionslinelistz&Default marker for empty parametersets)getgroup
_addoption	addoptionaddinir   )parsergroups     r$   pytest_addoptionr<   Z   s    OOI&E	,  ( 
1   
OOC   MM)F
S
MM+-UVr%   T)tryfirstc                   SS K nU R                  R                  (       a  U R                  5         UR                  R                  U 5      nU R                  S5       He  nUR                  SS5      nUS   n[        U5      S:X  a  US   OSnUR                  SU S3SS	9  UR                  U5        UR                  5         Mg     U R                  5         gg )
Nr   r4   :r	      r*   z@pytest.mark.T)bold)_pytest.configoptionr4   _do_configureconfigcreate_terminal_writergetinisplitlenwriteline_ensure_unconfigure)rE   _pytesttwrK   partsnamerests          r$   pytest_cmdline_mainrR      s    }}^^226:MM),DJJsA&E8D"5zQ58BDHH}TF!,4H8GGDMGGI - 	""$r%   c                  F    \ rS rSr% SrSrS\S'   \S
S j5       rSS jr	Sr
g	)KeywordMatcher   a  A matcher for keywords.

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

Will match on the name of colitem, including the names of its parents.
Only matches names of items which are either a :class:`Class` or a
:class:`Function`.

Additionally, matches on names in the 'extra_keyword_matches' set of
any item, as well as names directly assigned to test functions.
)_nameszAbstractSet[str]rV   c                4   [        5       nSS KnUR                  5        H{  n[        XCR                  5      (       a  M  [        XCR
                  5      (       a'  [        UR                  UR                  5      (       a  M`  UR                  UR                  5        M}     UR                  UR                  5       5        [        USS 5      nU(       a  UR                  UR                  5        UR                  S UR                  5        5       5        U " U5      $ )Nr   functionc              3  8   #    U  H  oR                   v   M     g 7fN)rP   ).0marks     r$   	<genexpr>+KeywordMatcher.from_item.<locals>.<genexpr>   s     F2E$II2Es   )setpytest	listchain
isinstanceSession	DirectoryparentaddrP   updatelistextrakeywordsgetattr__dict__iter_markers)clsitemmapped_namesr`   nodefunction_objs         r$   	from_itemKeywordMatcher.from_item   s    u
 	NN$D$//$ 0 011jV^^7 7 TYY' % 	D2245 tZ6 5 56 	F$2C2C2EFF<  r%   c                  ^ U(       a  [        S5      eTR                  5       m[        U4S jU R                   5       5      $ )Nz3Keyword expressions do not support call parameters.c              3  J   >#    U  H  nTUR                  5       ;   v   M     g 7frZ   )lower)r[   rP   subnames     r$   r]   *KeywordMatcher.__call__.<locals>.<genexpr>   s     C{t7djjl*{s    #)r   ru   anyrV   )selfrv   kwargss    ` r$   __call__KeywordMatcher.__call__   s2    RSS--/Ct{{CCCr%   r   N)rm   r   returnrT   )rv   strrz   str | int | bool | Noner}   bool)__name__
__module____qualname____firstlineno____doc__	__slots____annotations__classmethodrq   r{   __static_attributes__r   r%   r$   rT   rT      s,     I! !<Dr%   rT   c                r   UR                   R                  R                  5       nU(       d  g [        US5      n/ n/ nU  HP  nUR	                  [
        R                  U5      5      (       d  UR                  U5        M?  UR                  U5        MR     U(       a  UR                  R                  US9  X@S S & g g )NzWrong expression passed to '-k'items)
rC   r)   lstrip_parse_expressionevaluaterT   rq   appendhookpytest_deselected)r   rE   keywordexprexpr	remaining
deselectedcolitems          r$   deselect_by_keywordr      s    --''..0K[*KLDIJ}}^55g>??g&W%	  %%J%7a r%   c                  F    \ rS rSr% SrSrS\S'   \S
S j5       rSS jr	Sr
g	)MarkMatcher   zmA 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                    [         R                  " [        5      nU H   nX#R                     R	                  U5        M"     U " U5      $ rZ   )collectionsdefaultdictlistrP   r   )rl   r4   mark_name_mappingr\   s       r$   from_markersMarkMatcher.from_markers   s>    '33D9Dii(//5 $%%r%   c                  ^ U R                   R                  U/ 5      =n(       d  gU H-  m[        U4S jUR                  5        5       5      (       d  M-    g   g)NFc              3  n   >#    U  H*  u  pTR                   R                  U[        5      U:H  v   M,     g 7frZ   )rz   getr   )r[   kvr\   s      r$   r]   'MarkMatcher.__call__.<locals>.<genexpr>   s'     O4;;??1g.!3s   25T)r   r   allr   )ry   rP   rz   matchesr\   s       @r$   r{   MarkMatcher.__call__   sM    5599$CCCDOOOO  r%   r   N)r4   zIterable[Mark]r}   r   )rP   r~   rz   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                r   UR                   R                  nU(       d  g [        US5      n/ n/ nU  H^  nUR                  [        R                  UR                  5       5      5      (       a  UR                  U5        MM  UR                  U5        M`     U(       a  UR                  R                  US9  X@S S & g g )NzWrong expression passed to '-m'r   )
rC   r1   r   r   r   r   rk   r   r   r   )r   rE   	matchexprr   r   r   rm   s          r$   deselect_by_markr     s    &&IY(IJDIJ==11$2C2C2EFGGT"d#	 
 %%J%7a r%   c                |     [         R                  " U 5      $ ! [         a  n[        U SU  SU 35      S eS nAff = f)Nz: )r
   compiler   r   )r   exc_messagees      r$   r   r     sI    B!!$'' BK=4&1#67TABs    
;6;c                0    [        X5        [        X5        g rZ   )r   r   )r   rE   s     r$   pytest_collection_modifyitemsr     s    &U#r%   c                    [         R                  U R                  [        '   U [         l        U R	                  [
        5      nUS;  a  [        [
        < SU< 35      eg )N)skipxfailfail_at_collectNr*   z9 must be one of skip, xfail or fail_at_collect but it is )r   _configstashold_mark_config_keyrG   r   r   )rE   empty_parametersets     r$   pytest_configurer     sa    (0(8(8FLL$%H'@A!OO(+ ,,/1
 	
 Pr%   c                V    U R                   R                  [        S 5      [        l        g rZ   )r   r   r   r   r   )rE   s    r$   pytest_unconfigurer   ,  s    ||''(;TBHr%   )r#   objectr   z0MarkDecorator | Collection[MarkDecorator | Mark]r    zstr | _HiddenParam | Noner}   r   )r:   r   r}   None)rE   r   r}   zint | ExitCode | None)r   z
list[Item]rE   r   r}   r   )r   r~   r   r~   r}   r
   )rE   r   r}   r   )4r   
__future__r   r   collections.abcr   r   r   AbstractSetdataclassestypingr   r   
expressionr
   r   
structuresr   r   r   r   r   r   r   r   r   rB   r   r   r   r   _pytest.config.argparsingr   r   _pytest.stashr   _pytest.nodesr   __all__r   r"   r<   rR   	dataclassrT   r   r   r   r   r   r   r   r   r%   r$   <module>r      s/   C "  & $ .     " " $ 1 3 $    % % $ ! # # % - , " " x/02 
 ?A$($;$;;$; 	"$; 	$;N'WT 
4 & 5D 5D 5Dp(   6$B$


Cr%   