
    Xi#'                    *   S r SSKJr  SSKrSSKJr  SSKJr  SSK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r " S S\R(                  5      rSS jr\R.                  " SS9SS j5       rSS jrSS jrSS jrSS jrSS jrg)z3Version info, help messages, tracing configuration.    )annotationsN)	Generator)Sequence)Any)Config)ExitCode)	PrintHelp)Parser)TerminalReporterc                  h   ^  \ rS rSrSrSS.       SU 4S jjjr S	         S
S jjrSrU =r$ )
HelpAction   a  An argparse Action that will raise a PrintHelp exception in order to skip
the rest of the argument parsing when --help is passed.

This prevents argparse from raising UsageError when `--help` is used along
with missing required arguments when any are defined, for example by
``pytest_addoption``. This is similar to the way that the builtin argparse
--help option is implemented by raising SystemExit.

To opt in to this behavior, the parse caller must set
`namespace._raise_print_help = True`. Otherwise it just sets the option.
N)helpc          	     *   > [         TU ]  UUSSSUS9  g )Nr   TF)option_stringsdestnargsconstdefaultr   )super__init__)selfr   r   r   	__class__s       E/var/www/html/venv/lib/python3.13/site-packages/_pytest/helpconfig.pyr   HelpAction.__init__"   s)     	) 	 	
    c                t    [        X R                  U R                  5        [        USS5      (       a  [        eg )N_raise_print_helpF)setattrr   r   getattrr	   )r   parser	namespacevaluesoption_strings        r   __call__HelpAction.__call__.   s0     		99djj191599O :r    )r   zSequence[str]r   strr   
str | NonereturnNone)N)
r!   zargparse.ArgumentParserr"   zargparse.Namespacer#   zstr | Sequence[Any] | Noner$   r)   r*   r+   )	__name__
__module____qualname____firstlineno____doc__r   r%   __static_attributes____classcell__)r   s   @r   r   r      sx    
 OS

+

36

AK

	

 

" %)
'
 &
 +	

 "
 

 
r   r   c           
     >   U R                  S5      nUR                  SSSSSSS9  UR                  S	S
[        SSS9  UR                  SSS/ SSS9  UR                  SSSSS9  UR                  SSSSSS9  UR                  SSSSS S!S"S#9  UR                  S$S%S&SS'S(9  g ))Ndebugconfigz	--versionz-Vcountr   versionzoDisplay pytest version and information about plugins. When given twice, also display information about plugins.)actionr   r   r   z-hz--helpr   z(Show help message and configuration info)r7   r   r   z-pappendpluginsnamezEarly-load given plugin module name or entry point (multi-allowed). To avoid loading of plugins, use the `no:` prefix, e.g. `no:doctest`. See also --disable-plugin-autoload.)r7   r   r   metavarr   z--disable-plugin-autoload
store_trueFzDisable plugin auto-loading through entry point packaging metadata. Only plugins explicitly specified in -p or env var PYTEST_PLUGINS will be loaded.)r7   r   r   z--traceconfigz--trace-configz)Trace considerations of conftest.py filesz--debugstore?zpytestdebug.logdebugDEBUG_FILE_NAMEzStore internal tracing debug information in this log file. This file is opened with 'w' and truncated as a result, care advised. Default: pytestdebug.log.)r7   r   r   r   r;   r   z-oz--override-inioverride_inizhOverride configuration option with "option=value" style, e.g. `-o strict_xfail=True -o cache_dir=cache`.)r   r7   r   )getgroup	addoption
_addoptionr   )r!   groups     r   pytest_addoptionrF   ;   s   OOM*E	OOD   
7   
<  	 
OO#\	   
OO8   
OO!$  
 
:  r   T)wrapperc               #    ^^^#    S v mTR                   R                  (       Ga@  TR                   R                  n [        U SSS9mTR                  SR	                  [
        R                  SR                  [        [        [        R                  5      5      TR                  R                  [        R                  " 5       TR                  R                   5      5        TR"                  R$                  R'                  TR                  5        TR(                  R+                  5       m[        R,                  R                  SU  S35        S	UUU4S jjnTR/                  U5        T$ 7f)
Nwzutf-8)encodingz@versions pytest-{}, python-{}
invocation_dir={}
cwd={}
args={}

.z$writing pytest debug information to 
c                    > TR                  5         [        R                  R                  STR                   S35        T R
                  R                  R                  S 5        T" 5         g )Nz"wrote pytest debug information to rL   )closesysstderrwriter:   traceroot	setwriter)config	debugfileundo_tracings   r   unset_tracing+pytest_cmdline_parse.<locals>.unset_tracing   sL    OOJJA)..AQQSTULL''-Nr   )r*   r+   )optionr?   openrQ   formatpytest__version__joinmapr(   rO   version_infoinvocation_paramsdirosgetcwdargsrR   rS   rT   pluginmanagerenable_tracingrP   add_cleanup)pathrX   rU   rV   rW   s     @@@r   pytest_cmdline_parserk   z   s    F}}}}""sW5	@@F""S#"2"234((,,		((--A		
 	##IOO4++::<

?vRHI	 	 	=)Ms   E#E(c                   [         R                  R                  S[        R                   S[        R
                   S35        [        U 5      nU(       a,  U H%  n[         R                  R                  US-   5        M'     gg)z<Show verbose pytest version installation, including plugins.zThis is pytest version z, imported from rL   N)rO   stdoutrQ   r]   r^   __file__getpluginversioninfo)rU   
plugininfolines      r   show_version_verboserr      sh    JJ
!&"4"4!55EfooEVVXY &f-JDJJTD[)  r   c                   U R                   R                  S:  a  [        U 5        [        R                  $ U R                   R
                  (       a;  U R                  5         [        U 5        U R                  5         [        R                  $ g )N   )	rZ   r6   rr   r   OKr   _do_configureshowhelp_ensure_unconfigure)rU   s    r   pytest_cmdline_mainry      sb     }}q V${{			""${{r   c           	     L   SS K nU R                  R                  S5      nUc   eUR                  nUR	                  U R
                  R                  R                  5       5        UR                  5         UR                  S5        UR                  5         UR                  nSnSU-  nU R
                  R                   GH  nU R
                  R                  U   u  pn
Uc  [        SU 35      eU SU	 S3nUR	                  S	U 35        [        U5      nXS
-
  :  a?  UR                  5         UR                  UUUUSS9nU H  nUR                  U5        M     M  UR	                  SX\-
  S-
  -  5        UR                  XU-
  SS9nU(       d  M  UR                  US   5        USS   H  nUR                  Xn-   5        M     GM
     UR                  5         UR                  S5        / SQnU H  u  pxUR                  S	US SU 35        M     UR                  5         UR                  5         UR                  S5        UR                  S5        UR                  S5        UR                  R                  S/ 5       H   nUR                  SUR                   -   SS9  M"     g )Nr   terminalreporterzo[pytest] configuration options in the first pytest.toml|pytest.ini|tox.ini|setup.cfg|pyproject.toml file found:    z!help argument cannot be None for z (z):     F)initial_indentsubsequent_indentbreak_on_hyphens   )r   rt   zEnvironment variables:)	)CIzlWhen set to a non-empty value, pytest knows it is running in a CI process and does not truncate summary info)BUILD_NUMBERzEquivalent to CI)PYTEST_ADDOPTSzExtra command line options)PYTEST_PLUGINSz.Comma-separated plugins to load during startup)PYTEST_DISABLE_PLUGIN_AUTOLOADz"Set to disable plugin auto-loading)PYTEST_DEBUGz1Set to enable debug tracing of pytest's internals)PYTEST_DEBUG_TEMPROOTz'Override the system temporary directory)PYTEST_THEMEz)The Pygments style to use for code output)PYTEST_THEME_MODEz3Set the PYTEST_THEME to be either 'dark' or 'light'z<24z/to see available markers type: pytest --markersz1to see available fixtures type: pytest --fixturesz(shown according to specified file_or_dir or current dir if not specified; fixtures with leading '_' are only shown with the '-v' optionwarningsz
warning : T)red)textwraprg   
get_plugin_twrQ   _parser	optparserformat_helprq   	fullwidth_inidict	TypeErrorlenwrapstatsgetmessage)rU   r   reportertwcolumns
indent_lenindentr:   r   type_defaultspecspec_len	helplinesrq   wrappedvarswarningreports                     r   rw   rw      ss   (.(<(<(G(G)H 	BHHV^^%%1134GGIGG	N GGIllGJ:F''%~~66t<H<?vFGGr$r"
2dVt9A~&GGI %"(!& & I " " HHSJ1A567mmDJ*>QVmWGw
##ABKDGGFM* (7 (< GGIGG$%D 

"T#Jav&' GGIGGIGG=>GG?@GG	 "++J;
}444$? <r   c                   / nU R                   R                  5       nU(       ad  UR                  S5        U HM  u  p4[        US[	        U5      5      nUR
                   SUR                   SU 3nUR                  SU-   5        MO     U$ )Nzregistered third-party plugins:rn   -z at r~   )rg   list_plugin_distinfor8   r    reprproject_namer6   )rU   linesrp   plugindistloccontents          r   ro   ro     s    E%%::<J67&LF&*d6l;C**+1T\\N$seDGLL( ' Lr   c                $   / nU R                   R                  (       d  U R                   R                  (       aE  UR                  S[        R
                   35        [        U 5      nU(       a  UR                  U5        U R                   R                  (       aw  UR                  S5        U R                  R                  5       nU HF  u  pE[        US5      (       a  UR                  nO[        U5      nUR                  SUS SU 35        MH     U$ )Nzusing: pytest-zactive plugins:rn   z    z<20z: )rZ   r?   traceconfigr8   r]   r^   ro   extendrg   list_name_pluginhasattrrn   r   )rU   r   verinfoitemsr:   r   rs          r   pytest_report_headerr     s    E}}fmm77~f&8&8%9:;&v.LL!}}  &'$$557!LDvz**OOLLL4SzA3/0 " Lr   )r!   r
   r*   r+   )r*   zGenerator[None, Config, Config])rU   r   r*   r+   )rU   r   r*   zint | ExitCode | None)rU   r   r*   z	list[str])r0   
__future__r   argparsecollections.abcr   r   rd   rO   typingr   _pytest.configr   r   r	   _pytest.config.argparsingr
   _pytest.terminalr   r]   Actionr   rF   hookimplrk   rr   ry   rw   ro   r   r'   r   r   <module>r      s    9 "  % $ 	 
  ! # $ , - # #L<~  @*P@f	r   