
    F-Ph$                    
   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	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Z G d de          Zd dZ ej        d          d!d            Zd"dZd#dZd"dZdgZd$dZd$dZdS )%z3Version info, help messages, tracing configuration.    )annotations)Action)	GeneratorN)Config)ExitCode)	PrintHelp)Parser)TerminalReporterc                  ,     e Zd ZdZd fd	ZddZ xZS )
HelpActiona}  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.
    NFc                V    t                                          ||d|d|           d S )NTr   )option_stringsdestconstdefaultnargshelp)super__init__)selfr   r   r   r   	__class__s        R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/_pytest/helpconfig.pyr   zHelpAction.__init__   s@    ) 	 	
 	
 	
 	
 	
    c                v    t          || j        | j                   t          |j        dd          rt
          d S )Nafter_preparseF)setattrr   r   getattr_parserr   )r   parser	namespacevaluesoption_strings        r   __call__zHelpAction.__call__'   s@    	49dj111 6>#3U;; 	O	 	r   )NFN)N)__name__
__module____qualname____doc__r   r#   __classcell__)r   s   @r   r   r      s[         
 
 
 
 
 
       r   r   r   r	   returnNonec           	        |                      d          }|                    dddddd           |                    d	d
t          dd           |                    dddg dd           |                    dddd           |                    ddddd           |                    ddddd d!d"#           |                    d$d%d&dd'(           d S ))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)r/   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.)r/   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.)r/   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.)r/   r   r   r   r3   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   r/   r   )getgroup	addoption
_addoptionr   )r   groups     r   pytest_addoptionr>   /   sj   OOM**E	OOD     
7     
<  	 	 	 
OO#\	     
OO8     
OO!$  
 
 
 
:      r   T)wrapperGenerator[None, Config, Config]c               #  ~  K   d V j         j        r&j         j        } t          | dd                              d                    t
          j        d                    t          t          t          j                            j        j        t          j                    j        j                             j        j                            j                   j                                        t          j                            d|  d           dfd
}                    |           S )Nwzutf-8)encodingz@versions pytest-{}, python-{}
invocation_dir={}
cwd={}
args={}

.z$writing pytest debug information to 
r)   r*   c                                                       t          j                            dj         d            j        j                            d                          d S )Nz"wrote pytest debug information to rE   )closesysstderrwriter2   traceroot	setwriter)config	debugfileundo_tracings   r   unset_tracingz+pytest_cmdline_parse.<locals>.unset_tracing   s_    OOJT).TTTUUUL''---LNNNNNr   )r)   r*   )optionr7   openrJ   formatpytest__version__joinmapstrrH   version_infoinvocation_paramsdirosgetcwdargsrK   rL   rM   pluginmanagerenable_tracingrI   add_cleanup)pathrQ   rN   rO   rP   s     @@@r   pytest_cmdline_parserd   n   s=     UUF} *}"sW555	@@F"S#"23344(,	(-A A		
 		
 		
 	##IO444+::<<
HHHHIII	 	 	 	 	 	 	 	 	=)))Mr   rN   r   c                l   | j         j        dk    rvt          j                            dt
          j         dt
          j         d           t          |           }|r'|D ]&}t          j                            |dz              %d S d S t          j                            dt
          j         d           d S )N   zThis is pytest version z, imported from rE   zpytest )	rR   r.   rH   stdoutrJ   rU   rV   __file__getpluginversioninfo)rN   
plugininfolines      r   showversionrl      s    }q  
]f&8]]&/]]]	
 	
 	
 *&11
 	." . .
  ----	. 	.. . 	
96#5999:::::r   int | ExitCode | Nonec                    | j         j        dk    rt          |            dS | j         j        r9|                                  t          |            |                                  dS d S )Nr   )rR   r.   rl   r   _do_configureshowhelp_ensure_unconfigure)rN   s    r   pytest_cmdline_mainrr      sn    }q  Fq		 ""$$$q4r   c                   dd l }| j                            d          }|J |j        }|                    | j        j                                                   |                                 |                    d           |                                 |j	        }d}d|z  }| j        j
        D ]-}| j        j        |         \  }}	}
|	d}	|t          d|           | d|	 d	}|                    d
|            t          |          }||dz
  k    rI|                                 |                    ||||d          }|D ]}|                    |           |                    d||z
  dz
  z             |                    |||z
  d          }|r@|                    |d                    |dd          D ]}|                    ||z              /|                                 |                    d           g d}|D ]!\  }}|                    d
|dd|            "|                                 |                                 |                    d           |                    d           |                    d           |j                            dg           D ]!}|                    d|j        z   d           "d S )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|   rf   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)textwrapr`   
get_plugin_twrJ   r   	optparserformat_helprk   	fullwidth	_ininames_inidict	TypeErrorlenwrapstatsgetmessage)rN   r   reportertwcolumns
indent_lenindentr2   r   typer   specspec_len	helplinesrk   wrappedvarswarningreports                     r   rp   rp      sJ   OOO(.(<(G(G) )H 	BHHV^%1133444GGIIIGG	B   GGIIIlGJ:F( + +$n5d;dG<D<FFFGGG""$"""
dt99zA~&&GGIII %"(!& &  I "   HHSJ1A56777mmD'J*>QVmWWG +
####ABBK + +DGGFTM****GGIIIGG$%%%  D  ( (
d
&T&&&&&''''GGIIIGGIIIGG=>>>GG?@@@GG	   "++J;; @ @
}44$????@ @r   )pytest_pluginszlist of plugin names to load	list[str]c                   g }| j                                         }|rg|                    d           |D ]O\  }}t          |dt	          |                    }|j         d|j         d| }|                    d|z              P|S )Nzregistered third-party plugins:rh   -z at rx   )r`   list_plugin_distinfor0   r   reprproject_namer.   )rN   linesrj   plugindistloccontents          r   ri   ri      s    E%::<<J )6777& 	) 	)LFD&*d6ll;;C*DDT\DDsDDGLL((((Lr   c                   g }| j         j        s| j         j        rH|                    dt          j                    t          |           }|r|                    |           | j         j        ry|                    d           | j        	                                }|D ]H\  }}t          |d          r|j        }nt          |          }|                    d|dd|            I|S )Nzusing: pytest-zactive plugins:rh   z    z<20z: )rR   r7   traceconfigr0   rU   rV   ri   extendr`   list_name_pluginhasattrrh   r   )rN   r   verinfoitemsr2   r   rs          r   pytest_report_headerr   	  s    E} "fm7 ":f&8::;;;&v.. 	"LL!!!}  1&'''$5577! 	1 	1LD&vz** !OLLLL////A//0000Lr   )r   r	   r)   r*   )r)   r@   )rN   r   r)   r*   )rN   r   r)   rm   )rN   r   r)   r   )r'   
__future__r   argparser   collections.abcr   r]   rH   _pytest.configr   r   r   _pytest.config.argparsingr	   _pytest.terminalr
   rU   r   r>   hookimplrd   rl   rr   rp   conftest_optionsri   r    r   r   <module>r      s   9 9 " " " " " "       % % % % % % 				 



 ! ! ! ! ! ! # # # # # # $ $ $ $ $ $ , , , , , , - - - - - -        8< < < <~    @
; 
; 
; 
;	 	 	 	O@ O@ O@ O@d GG 	 	 	 	     r   