
    ?g"                       S 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\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/rSS jrSS jrg)z3Version info, help messages, tracing configuration.    )annotations)ActionN)	Generator)Config)ExitCode)	PrintHelp)Parser)TerminalReporterc                  :   ^  \ rS rSrSrSU 4S jjrSS jrSrU =r$ )
HelpAction   ae  An argparse Action that will raise an exception in order to skip the
rest of the argument parsing when --help is passed.

This prevents argparse from quitting due to 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.
c           	     *   > [         TU ]  UUSUSUS9  g )NTr   )option_stringsdestconstdefaultnargshelp)super__init__)selfr   r   r   r   	__class__s        4/usr/lib/python3/dist-packages/_pytest/helpconfig.pyr   HelpAction.__init__   s'    ) 	 	
    c                    [        X R                  U R                  5        [        UR                  SS5      (       a  [
        eg )Nafter_preparseF)setattrr   r   getattr_parserr   )r   parser	namespacevaluesoption_strings        r   __call__HelpAction.__call__'   s4    	99djj1 6>>#3U;;O <r    )NFN)N)	__name__
__module____qualname____firstlineno____doc__r   r%   __static_attributes____classcell__)r   s   @r   r   r      s    
 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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)r3   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`.)r3   r   r   metavarr   z--traceconfigz--trace-config
store_trueFz)Trace considerations of conftest.py files)r3   r   r   z--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.)r3   r   r   r   r7   r   z-oz--override-inioverride_iniz^Override ini option with "option=value" style, e.g. `-o xfail_strict=True -o cache_dir=cache`.)r   r3   r   )getgroup	addoption
_addoptionr   )r!   groups     r   pytest_addoptionrB   /   s    OOM*E	OOD   
7   
  	 
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 rH   )closesysstderrwriter6   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   )returnNone)optionr;   openrM   formatpytest__version__joinmapstrrK   version_infoinvocation_paramsdirosgetcwdargsrN   rO   rP   pluginmanagerenable_tracingrL   add_cleanup)pathrT   rQ   rR   rS   s     @@@r   pytest_cmdline_parserj   g   s    F}}}}""sW5	@@F""S#"2"234((,,		((--A		
 	##IOO4++::<

?vRHI	 	 	=)Ms   E#E(c                   U R                   R                  S:  a  [        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 [        R                  R	                  S[
        R                   S35        g )N   zThis is pytest version z, imported from rH   zpytest )	rX   r2   rK   stdoutrM   r[   r\   __file__getpluginversioninfo)rQ   
plugininfolines      r   showversionrr      s    }}q 

%f&8&8%99I&//IZZ\]	
 *&1
"

  - #  	

76#5#5"6b9:r   c                    U R                   R                  S:  a  [        U 5        gU R                   R                  (       a,  U R	                  5         [        U 5        U R                  5         gg )Nr   )rX   r2   rr   r   _do_configureshowhelp_ensure_unconfigure)rQ   s    r   pytest_cmdline_mainrw      sR    }}q F			""$r   c           	     V   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n	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   terminalreporterzY[pytest] ini-options in the first pytest.ini|tox.ini|setup.cfg|pyproject.toml file found:    stringz!help argument cannot be None for z (z):     F)initial_indentsubsequent_indentbreak_on_hyphens   )r   rl   zEnvironment variables:))CIzmWhen set (regardless of 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 internalsz<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)textwraprf   
get_plugin_twrM   r    	optparserformat_helprq   	fullwidth	_ininames_inidict	TypeErrorlenwrapstatsgetmessage)rQ   r   reportertwcolumns
indent_lenindentr6   r   typer   specspec_len	helplinesrq   wrappedvarswarningreports                     r   ru   ru      s~   (.(<(<(G(G)H 	BHHV^^%%1134GGIGG	B GGIllGJ:F(($nn55d;G<D<?vFGGr$r"
2dVt9A~&GGI %"(!& & I " " HHSJ1A567mmDJ*>QVmWGw
##ABKDGGFM* (; )@ GGIGG$%D 

"T#Jav&' GGIGGIGG=>GG?@GG	 "++J;
}444$? <r   )pytest_pluginszlist of plugin names to loadc                   / 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}   )rf   list_plugin_distinfor4   r   reprproject_namer2   )rQ   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: )rX   r;   traceconfigr4   r[   r\   ro   extendrf   list_name_pluginhasattrrn   r   )rQ   r   verinfoitemsr6   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	   rV   rW   )rV   zGenerator[None, Config, Config])rQ   r   rV   rW   )rQ   r   rV   zint | ExitCode | None)rQ   r   rV   z	list[str])r,   
__future__r   argparser   rc   rK   typingr   _pytest.configr   r   r   _pytest.config.argparsingr	   _pytest.terminalr
   r[   r   rB   hookimplrj   rr   rw   ru   conftest_optionsro   r   r'   r   r   <module>r      s    9 "  	 
  ! # $ , -  85p  @
;	O@d GG 	r   