
    	h!                     x   d 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	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  G d de          ZdeddfdZ e	j        d          d             ZdeddfdZdedeeeef                  fdZdeddfdZdgZdedee         fdZdedee         fdZdS )z3Version info, help messages, tracing configuration.    N)Action)List)Optional)Union)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        _/var/www/html/web-builder-api.evdpl.com/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    returnc           	      z   |                      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 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`.)r/   r   r   metavarr   z--traceconfigz--trace-config
store_trueFz)Trace considerations of conftest.py files)r/   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.)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>   -   s>   OOM**E	OOD     
7     
  	 	 	 
OO8     
OO!$  
 
 
 
:      r   T)hookwrapperc               #     K   d V } |                                  j        j        rj        j        }t          |dd                              dt
          j        dd                    t          t          t          j                            dt          j                    dj        j        d		           j        j                            j                   j                                        t          j                            d
|z             dfd}                    |           d S d S )Nwzutf-8)encodingzversions pytest-z	, python-.z
cwd=z
args=z

z'writing pytest debug information to %s
r*   c                                                        t          j                            dj        z              j        j                            d                          d S )Nz%wrote pytest debug information to %s
)closesysstderrwriter2   traceroot	setwriter)config	debugfileundo_tracings   r   unset_tracingz+pytest_cmdline_parse.<locals>.unset_tracing|   sY    OOJE	VWWWL''---LNNNNNr   )r*   N)
get_resultoptionr7   openrH   pytest__version__joinmapstrrF   version_infoosgetcwdinvocation_paramsargsrI   rJ   rK   pluginmanagerenable_tracingrG   add_cleanup)outcomepathrO   rL   rM   rN   s      @@@r   pytest_cmdline_parserb   e   sR     eeG''))F} *}"sW555	 """S#"2334444	(---		
 		
 		
 	##IO444+::<<
CdJKKK	 	 	 	 	 	 	 	 	=)))))1* *r   rL   c                    | j         j        dk    rt          j                            d                    t          j        t          j                             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 {}, imported from {}

zpytest )
rQ   r.   rF   stdoutrH   formatrS   rT   __file__getpluginversioninfo)rL   
plugininfolines      r   showversionrl      s    }q  
;BB"FO 	
 	
 	

 *&11
 	." . .
  ----	. 	.. . 	
96#5999:::::r   c                     | j         j        dk    rt          |            dS | j         j        r9|                                  t          |            |                                  dS d S )Nr   )rQ   r.   rl   r   _do_configureshowhelp_ensure_unconfigure)rL   s    r   pytest_cmdline_mainrq      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
|z             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):z  %s   F)initial_indentsubsequent_indentbreak_on_hyphens   )rz   rd   zEnvironment variables:))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  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)textwrapr]   
get_plugin_twrH   r   	optparserformat_helprk   	fullwidth	_ininames_inidict	TypeErrorlenwrapstatsgetmessage)rL   r   reportertwcolumns
indent_lenindentr2   r   typer   specspec_len	helplinesrk   wrappedvarswarningreports                     r   ro   ro      sA   OOO+1+?+J+J, ,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""$"""
$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$????
Fr   )pytest_pluginszlist of plugin names to loadc                    g }| j                                         }|rg|                    d           |D ]O\  }}t          |dt	          |                    }|j         d|j         d| }|                    d|z              P|S )Nzsetuptools registered plugins:rh   -z at r   )r]   list_plugin_distinfor0   r   reprproject_namer.   )rL   linesrj   plugindistloccontents          r   ri   ri      s    E%::<<J )5666& 	) 	)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: )rQ   r7   traceconfigr0   rS   rT   ri   extendr]   list_name_pluginhasattrrh   r   )rL   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(   rY   rF   argparser   typingr   r   r   rS   _pytest.configr   r   r	   _pytest.config.argparsingr
   _pytest.terminalr   r   r>   hookimplrb   rl   intrq   ro   conftest_optionsrW   ri   r    r   r   <module>r      s   9 9 				 



                          ! ! ! ! ! ! # # # # # # $ $ $ $ $ $ , , , , , , - - - - - -       85V 5 5 5 5 5p T"""* * #"*>; ;4 ; ; ; ;	 	8E#x-4H+I 	 	 	 	JV J J J J JZ GG 	 	DI 	 	 	 	 DI      r   