B
    `Ut                 @   s  d Z ddlZddl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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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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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(m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 d Z1d!Z2e3d"Z4e.d#  Z5e.ee6eej7 f   Z8e6e6d$d%d&Z9G d'd( d(ej:Z;G d)d* d*ej<Z=e e6d+d,d-Z>e%dd.d/d0Z?ed1ej@d2ZAG d3d4 d4ZBG d5d# d#ejCZDeG d6d7 d7ZEe)e*eeEddf d8d9d:ZFe e6eeG d;d<d=ZHe"d>d?e dd@dAdBZIG dCdD dDZJG dEdF dFejKZLG dGdH dHejCZMG dIdJ dJejNZOdS )Kz!Access and control log capturing.    N)contextmanager)StringIO)Path)AbstractSet)Dict)	Generator)List)Mapping)Optional)Tuple)TypeVar)Union)nodes)TerminalWriter)CaptureManager)final)nullcontext)
_strtobool)Config)create_terminal_writer)hookimpl)
UsageError)Parser)check_ispytest)fixture)FixtureRequest)Session)StoreKey)TerminalReporterz<%(levelname)-8s %(name)s:%(filename)s:%(lineno)d %(message)sz%H:%M:%Sz\x1b\[[\d;]+mLogCaptureHandler)textreturnc             C   s   t d| S )N )_ANSI_ESCAPE_SEQsub)r     r%   W/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/_pytest/logging.py_remove_ansi_escape_sequences-   s    r'   c                   s   e Zd ZU dZejdhejddhejdhejdhej	dhej
dheje iZeeee f ed< edZed	d
 fddZejed fddZ  ZS )ColoredLevelFormatterzfA logging formatter which colorizes the %(levelname)..s part of the
    log format passed to __init__.ZredboldZyellowZgreenZpurpleLOGLEVEL_COLOROPTSz%\(levelname\)([+-.]?\d*s)N)terminalwriterr!   c                s   t  j|| | jj| _i | _| jd k	s,t| j| j}|sBd S |	 }xZ| j
 D ]L\}}|dt|i }dd |D }	|j|f|	}
| j|
| j| j|< qVW d S )N	levelnamec             S   s   i | ]
}d |qS )Tr%   ).0namer%   r%   r&   
<dictcomp>Q   s    z2ColoredLevelFormatter.__init__.<locals>.<dictcomp>)super__init___style_fmt_original_fmt_level_to_fmt_mappingAssertionErrorLEVELNAME_FMT_REGEXsearchgroupr*   itemslogginggetLevelNameZmarkupr$   )selfr+   argskwargsZlevelname_fmt_matchZlevelname_fmtlevelZ
color_optsZformatted_levelnameZcolor_kwargsZcolorized_formatted_levelname)	__class__r%   r&   r1   @   s     

zColoredLevelFormatter.__init__)recordr!   c                s&   | j |j| j}|| j_t |S )N)r5   getlevelnor4   r2   r3   r0   format)r=   rB   fmt)rA   r%   r&   rE   Y   s    zColoredLevelFormatter.format)__name__
__module____qualname____doc__r;   CRITICALERRORWARNINGWARNINFODEBUGNOTSETsetr*   r	   intr   str__annotations__recompiler7   r   r1   	LogRecordrE   __classcell__r%   r%   )rA   r&   r(   1   s   

 
r(   c                   s   e Zd ZdZeeeeedf dd fddZe	e
eef ee
eef dddZe	eeeedf ed	d
dZejedddZ  ZS )PercentStyleMultilinezA logging style with special support for multiline messages.

    If the message of a record consists of multiple lines, this style
    formats the message as if each line were logged separately.
    N)rF   auto_indentr!   c                s   t  | | || _d S )N)r0   r1   _get_auto_indent_auto_indent)r=   rF   r[   )rA   r%   r&   r1   f   s    zPercentStyleMultiline.__init__)record_dictmessager!   c             C   s   |   }||d< |S )Nr_   )copy)r^   r_   tmpr%   r%   r&   _update_messagej   s    z%PercentStyleMultiline._update_message)auto_indent_optionr!   c             C   s   | dkrdS t | tr$| rdS dS n`t | tr6t| S t | tryt| S  tk
r\   Y nX yt| rldS W n tk
r   dS X dS )a  Determine the current auto indentation setting.

        Specify auto indent behavior (on/off/fixed) by passing in
        extra={"auto_indent": [value]} to the call to logging.log() or
        using a --log-auto-indent [value] command line or the
        log_auto_indent [value] config option.

        Default behavior is auto-indent off.

        Using the string "True" or "on" or the boolean True as the value
        turns auto indent on, using the string "False" or "off" or the
        boolean False or the int 0 turns it off, and specifying a
        positive integer fixes the indentation position to the value
        specified.

        Any other values for the option are invalid, and will silently be
        converted to the default.

        :param None|bool|int|str auto_indent_option:
            User specified option for indentation from command line, config
            or extra kwarg. Accepts int, bool or str. str option accepts the
            same range of values as boolean config options, as well as
            positive integers represented in str form.

        :returns:
            Indentation value, which can be
            -1 (automatically determine indentation) or
            0 (auto-indent turned off) or
            >0 (explicitly set indentation position).
        Nr   )
isinstanceboolrS   rT   
ValueErrorr   )rc   r%   r%   r&   r\   r   s&    !


z&PercentStyleMultiline._get_auto_indent)rB   r!   c             C   s   d|j krt|dr"| |j}n| j}|r|j  }| j| |j|d  }|dk rjt	|
|d }n|}||d< dd|  |S | j|j S )N
r[   r    )r_   hasattrr\   r[   r]   
splitlinesr3   rb   __dict__r'   findjoin)r=   rB   r[   lines	formattedindentationr%   r%   r&   rE      s    


zPercentStyleMultiline.format)rG   rH   rI   rJ   rT   r   rS   rf   r1   staticmethodr   objectrb   r\   r;   rX   rE   rY   r%   r%   )rA   r&   rZ   _   s   "6rZ   )confignamesc             G   s6   x0|D ](}|  |}|d kr&| |}|r|S qW d S )N)	getoptiongetini)rt   ru   r.   retr%   r%   r&   get_option_ini   s    


ry   )parserr!   c                s    d d* fdd	}|dddddd	 |d
dtdd |ddtdd jddddd |ddddd |ddddd |ddddd |ddddd |d d!dd"d |d#d$tdd |d%d&tdd |d'd(dd)d dS )+z%Add options to control log capturing.r;   Nc                s0   j |||d|  d  j| fd|i| d S )Nzdefault value for )defaulttypehelpdest)addiniZ	addoption)optionr~   r{   r|   r?   )r9   rz   r%   r&   add_option_ini   s    z(pytest_addoption.<locals>.add_option_iniz--log-level	log_levelZLEVELzlevel of messages to catch/display.
Not set by default, so it depends on the root/parent log handler's effective level, where it is "WARNING" by default.)r~   r{   metavarr}   z--log-format
log_formatz)log format as used by the logging module.)r~   r{   r}   z--log-date-formatlog_date_formatz.log date format as used by the logging module.log_cliFrf   zBenable log display during test run (also known as "live logging").)r{   r|   r}   z--log-cli-levellog_cli_levelzcli logging level.z--log-cli-formatlog_cli_formatz--log-cli-date-formatlog_cli_date_formatz
--log-filelog_filez/path to a file when logging will be written to.z--log-file-levellog_file_levelzlog file logging level.z--log-file-formatlog_file_formatz--log-file-date-formatlog_file_date_formatz--log-auto-indentlog_auto_indentzfAuto-indent multiline messages passed to the logging module. Accepts true|on, false|off or an integer.)NN)ZgetgroupDEFAULT_LOG_FORMATDEFAULT_LOG_DATE_FORMATr   )rz   r   r%   )r9   rz   r&   pytest_addoption   sx    
r   _HandlerType)boundc               @   s<   e Zd ZdZdZdeee ddddZdd Z	d	d
 Z
dS )catching_logszCContext manager that prepares the whole logging machinery properly.)handlerr@   
orig_levelN)r   r@   r!   c             C   s   || _ || _d S )N)r   r@   )r=   r   r@   r%   r%   r&   r1   )  s    zcatching_logs.__init__c             C   sX   t  }| jd k	r | j| j || j | jd k	rR|j| _|t| j| j | jS )N)r;   	getLoggerr@   r   setLevel
addHandlerr   min)r=   root_loggerr%   r%   r&   	__enter__-  s    

zcatching_logs.__enter__c             C   s.   t  }| jd k	r|| j || j d S )N)r;   r   r@   r   r   removeHandlerr   )r=   r|   value	tracebackr   r%   r%   r&   __exit__7  s    
zcatching_logs.__exit__)N)rG   rH   rI   rJ   	__slots__r   r
   rS   r1   r   r   r%   r%   r%   r&   r   $  s
   
r   c                   sf   e Zd ZU dZeed< dd fddZejdd fdd	Z	ddd
dZ
ejddddZ  ZS )r   z;A logging handler that stores log records and the log text.streamN)r!   c                s   t  t  g | _dS )zCreate a new log handler.N)r0   r1   r   records)r=   )rA   r%   r&   r1   C  s    zLogCaptureHandler.__init__)rB   r!   c                s   | j | t | dS )z;Keep the log records in a list in addition to the log text.N)r   appendr0   emit)r=   rB   )rA   r%   r&   r   H  s    zLogCaptureHandler.emitc             C   s   g | _ t | _d S )N)r   r   r   )r=   r%   r%   r&   resetM  s    zLogCaptureHandler.resetc             C   s   t jr d S )N)r;   raiseExceptions)r=   rB   r%   r%   r&   handleErrorQ  s    zLogCaptureHandler.handleError)rG   rH   rI   rJ   r   rU   r1   r;   rX   r   r   r   rY   r%   r%   )rA   r&   r   >  s   
c               @   s  e Zd ZdZddejeddddZddd	d
Ze	e
dddZeeej dddZe	edddZe	eej dddZe	eeeeef  dddZe	ee dddZddddZd eeef ee ddddZed!eee ed dddZdS )"LogCaptureFixturez-Provides access and control of log capturing.F)	_ispytestN)itemr   r!   c            C   s   t | || _d | _i | _d S )N)r   _item_initial_handler_level_initial_logger_levels)r=   r   r   r%   r%   r&   r1   ^  s    zLogCaptureFixture.__init__)r!   c             C   sH   | j dk	r| j| j  x*| j D ]\}}t|}|| q$W dS )zbFinalize the fixture.

        This restores the log levels changed by :meth:`set_level`.
        N)r   r   r   r   r:   r;   r   )r=   Zlogger_namer@   loggerr%   r%   r&   	_finalizee  s
    

zLogCaptureFixture._finalizec             C   s   | j jt S )zXGet the logging handler used by the fixture.

        :rtype: LogCaptureHandler
        )r   _storecaplog_handler_key)r=   r%   r%   r&   r   q  s    zLogCaptureFixture.handler)whenr!   c             C   s   | j jt |g S )aU  Get the logging records for one of the possible test phases.

        :param str when:
            Which test phase to obtain the records from. Valid values are: "setup", "call" and "teardown".

        :returns: The list of captured records at the given stage.
        :rtype: List[logging.LogRecord]

        .. versionadded:: 3.4
        )r   r   caplog_records_keyrC   )r=   r   r%   r%   r&   get_recordsy  s    zLogCaptureFixture.get_recordsc             C   s   t | jj S )zThe formatted log text.)r'   r   r   getvalue)r=   r%   r%   r&   r      s    zLogCaptureFixture.textc             C   s   | j jS )zThe list of log records.)r   r   )r=   r%   r%   r&   r     s    zLogCaptureFixture.recordsc             C   s   dd | j D S )zA list of a stripped down version of log records intended
        for use in assertion comparison.

        The format of the tuple is:

            (logger_name, log_level, message)
        c             S   s   g | ]}|j |j| fqS r%   )r.   rD   
getMessage)r-   rr%   r%   r&   
<listcomp>  s    z3LogCaptureFixture.record_tuples.<locals>.<listcomp>)r   )r=   r%   r%   r&   record_tuples  s    	zLogCaptureFixture.record_tuplesc             C   s   dd | j D S )a  A list of format-interpolated log messages.

        Unlike 'records', which contains the format string and parameters for
        interpolation, log messages in this list are all interpolated.

        Unlike 'text', which contains the output from the handler, log
        messages in this list are unadorned with levels, timestamps, etc,
        making exact comparisons more reliable.

        Note that traceback or stack info (from :func:`logging.exception` or
        the `exc_info` or `stack_info` arguments to the logging functions) is
        not included, as this is added by the formatter in the handler.

        .. versionadded:: 3.7
        c             S   s   g | ]}|  qS r%   )r   )r-   r   r%   r%   r&   r     s    z.LogCaptureFixture.messages.<locals>.<listcomp>)r   )r=   r%   r%   r&   messages  s    zLogCaptureFixture.messagesc             C   s   | j   dS )z8Reset the list of log records and the captured log text.N)r   r   )r=   r%   r%   r&   clear  s    zLogCaptureFixture.clear)r@   r   r!   c             C   sH   t |}| j||j || | jdkr8| jj| _| j| dS )aa  Set the level of a logger for the duration of a test.

        .. versionchanged:: 3.4
            The levels of the loggers changed by this function will be
            restored to their initial values at the end of the test.

        :param int level: The level.
        :param str logger: The logger to update. If not given, the root logger.
        N)r;   r   r   
setdefaultr@   r   r   r   )r=   r@   r   
logger_objr%   r%   r&   	set_level  s    




zLogCaptureFixture.set_level)NNNc          	   c   sV   t |}|j}|| | jj}| j| z
dV  W d|| | j| X dS )a  Context manager that sets the level for capturing of logs. After
        the end of the 'with' statement the level is restored to its original
        value.

        :param int level: The level.
        :param str logger: The logger to update. If not given, the root logger.
        N)r;   r   r@   r   r   )r=   r@   r   r   r   Zhandler_orig_levelr%   r%   r&   at_level  s    



zLogCaptureFixture.at_level)N)N)rG   rH   rI   rJ   r   Noderf   r1   r   propertyr   r   rT   r   r;   rX   r   r    r   r   rS   r   r   r   r   r
   r   r   r   r   r%   r%   r%   r&   r   Z  s&   
 
r   )requestr!   c             c   s    t | jdd}|V  |  dS )a  Access and control log capturing.

    Captured logs are available through the following properties/methods::

    * caplog.messages        -> list of format-interpolated log messages
    * caplog.text            -> string containing formatted log output
    * caplog.records         -> list of logging.LogRecord instances
    * caplog.record_tuples   -> list of (logger_name, level, message) tuples
    * caplog.clear()         -> clear captured records and formatted log output string
    T)r   N)r   noder   )r   resultr%   r%   r&   caplog  s    r   )rt   setting_namesr!   c          
   G   s   x2|D ]&}|  |}|d kr&| |}|rP qW d S t|trF| }yttt||S  tk
r } zt	d
|||W d d }~X Y nX d S )Nzo'{}' is not recognized as a logging level name for '{}'. Please consider passing the logging level num instead.)rv   rw   re   rT   upperrS   getattrr;   rg   r   rE   )rt   r   Zsetting_namer   er%   r%   r&   get_log_level_for_setting  s     



r   T)Ztrylast)rt   r!   c             C   s   | j t| d d S )Nzlogging-plugin)pluginmanagerregisterLoggingPlugin)rt   r%   r%   r&   pytest_configure  s    r   c               @   sx  e Zd ZdZeddddZdd Zeddd	d
Zdd Z	e
ddded dddZe
ddded dddZe
ddeed dddZe
ddddZe
ddddZejeed dddZe
ddejed d d!d"Ze
ddejed d d#d$Ze
ddejed d d%d&Ze
ddd'd(Ze
ddded dd)d*Ze
ddd+d,ZdS )-r   zGAttaches to the logging module and captures log messages for each test.N)rt   r!   c       
      C   sl  || _ | t|dt|dt|d| _t|d| _t | _| j| j t | _	| j	| j t|d| _
t|dpztj}|tjkrtjtj|}tj|st| t|ddd	| _t|d
d}t|dd}tj||d}| j| t|dd| _|  r0|jd}|jd}t||| _nt | _| t|ddt|ddt|d}	| j|	 dS )zCreate a new plugin to capture log messages.

        The formatter can be safely shared across all handlers so
        create a single one for the entire test session here.
        r   r   r   r   r   r   wzUTF-8)modeencodingr   r   )datefmtr   terminalreporterZcapturemanagerr   r   N)_config_create_formatterry   	formatterr   r   r   caplog_handlersetFormatterreport_handlerr   osdevnullpathdirnameabspathisdirmakedirs_FileHandlerlog_file_handlerr;   	Formatterr   _log_cli_enabledr   
get_plugin_LiveLoggingStreamHandlerlog_cli_handler_LiveLoggingNullHandler)
r=   rt   r   	directoryr   r   Zlog_file_formatterterminal_reportercapture_managerZlog_cli_formatterr%   r%   r&   r1     sF    






zLoggingPlugin.__init__c             C   sZ   t | jjdd}|dkr8tj|r8tt| j||}nt||}t	|j
j|d|_
|S )Ncolorno)r[   )r   r   r   r(   r7   r8   r   r;   r   rZ   r2   r3   )r=   r   r   r[   r   r   r%   r%   r&   r   G  s    zLoggingPlugin._create_formatter)fnamer!   c             C   s   t |}| s| jj| }|j s6|jjddd |jddd}tj	dkr\| j
|}n6| j
j}| j
  z| j
  || j
_W d| j
  X |r|  dS )zSet the filename parameter for Logging.FileHandler().

        Creates parent directory if it does not exist.

        .. warning::
            This is an experimental API.
        T)exist_okparentsr   zUTF-8)r   r   )      N)r   is_absoluter   Zrootpathparentexistsmkdiropensysversion_infor   	setStreamr   acquireflushreleaseclose)r=   r   Zfpathr   Z
old_streamr%   r%   r&   set_log_pathY  s     



zLoggingPlugin.set_log_pathc             C   sB   | j ddk	p| j d}|s$dS | j jd}|dkr>dS dS )z'Return whether live logging is enabled.z--log-cli-levelNr   Fr   T)r   rv   rw   r   r   )r=   enabledr   r%   r%   r&   r   w  s    zLoggingPlugin._log_cli_enabledT)hookwrapperZtryfirst)NNN)r!   c          
   c   sN   | j d t| j | jd( t| j| jd d V  W d Q R X W d Q R X d S )NZsessionstart)r@   )r   set_whenr   r   r   r   )r=   r%   r%   r&   pytest_sessionstart  s    z!LoggingPlugin.pytest_sessionstartc          
   c   sN   | j d t| j | jd( t| j| jd d V  W d Q R X W d Q R X d S )NZ
collection)r@   )r   r  r   r   r   r   )r=   r%   r%   r&   pytest_collection  s    zLoggingPlugin.pytest_collection)r  )sessionr!   c          
   c   sx   |j jjrd V  d S |  r6| jddk r6d| jj_t| j| j	d( t| j
| jd d V  W d Q R X W d Q R X d S )Nverbose   )r@   )rt   r   Zcollectonlyr   r   rv   r  r   r   r   r   r   )r=   r  r%   r%   r&   pytest_runtestloop  s    

z LoggingPlugin.pytest_runtestloopc             C   s   | j   | j d d S )Nstart)r   r   r  )r=   r%   r%   r&   pytest_runtest_logstart  s    
z%LoggingPlugin.pytest_runtest_logstartc             C   s   | j d d S )NZ	logreport)r   r  )r=   r%   r%   r&   pytest_runtest_logreport  s    z&LoggingPlugin.pytest_runtest_logreport)r   r   r!   c          
   c   s   t | j| jdn}t | j| jdR}|  |  |j|jt |< ||jt< dV  |j	
  }||d| W dQ R X W dQ R X dS )z:Implement the internals of the pytest_runtest_xxx() hooks.)r@   Nlog)r   r   r   r   r   r   r   r   r   r   r   stripZadd_report_section)r=   r   r   r   r   r  r%   r%   r&   _runtest_for  s    
zLoggingPlugin._runtest_for)r   r!   c             c   s0   | j d i }||jt< | |dE d H  d S )Nsetup)r   r  r   r   r  )r=   r   emptyr%   r%   r&   pytest_runtest_setup  s    
z"LoggingPlugin.pytest_runtest_setupc             c   s"   | j d | |dE d H  d S )Ncall)r   r  r  )r=   r   r%   r%   r&   pytest_runtest_call  s    z!LoggingPlugin.pytest_runtest_callc             c   s2   | j d | |dE d H  |jt= |jt= d S )Nteardown)r   r  r  r   r   r   )r=   r   r%   r%   r&   pytest_runtest_teardown  s    z%LoggingPlugin.pytest_runtest_teardownc             C   s   | j d d S )Nfinish)r   r  )r=   r%   r%   r&   pytest_runtest_logfinish  s    z&LoggingPlugin.pytest_runtest_logfinishc          
   c   sN   | j d t| j | jd( t| j| jd d V  W d Q R X W d Q R X d S )NZsessionfinish)r@   )r   r  r   r   r   r   )r=   r%   r%   r&   pytest_sessionfinish  s    z"LoggingPlugin.pytest_sessionfinishc             C   s   | j   d S )N)r   r   )r=   r%   r%   r&   pytest_unconfigure  s    z LoggingPlugin.pytest_unconfigure)rG   rH   rI   rJ   r   r1   r   rT   r   r   r   r   r  r  r   r	  r  r  r   ZItemr  r  r  r  r  r  r  r%   r%   r%   r&   r   	  s8   ;


r   c               @   s"   e Zd ZdZejddddZdS )r   z)A logging FileHandler with pytest tweaks.N)rB   r!   c             C   s   d S )Nr%   )r=   rB   r%   r%   r&   r     s    z_FileHandler.handleError)rG   rH   rI   rJ   r;   rX   r   r%   r%   r%   r&   r     s   r   c                   s   e Zd ZU dZdZeed< eee ddddZ	dddd	Z
ee dd
ddZejdd fddZejddddZ  ZS )r   a  A logging StreamHandler used by the live logging feature: it will
    write a newline before the first log message in each test.

    During live logging we must also explicitly disable stdout/stderr
    capturing otherwise it will get captured and won't appear in the
    terminal.
    Nr   )r   r   r!   c             C   s2   t jj| |d || _|   | d  d| _d S )N)r   F)r;   StreamHandlerr1   r   r   r  _test_outcome_written)r=   r   r   r%   r%   r&   r1     s
    
z"_LiveLoggingStreamHandler.__init__)r!   c             C   s
   d| _ dS )zBReset the handler; should be called before the start of each test.FN)_first_record_emitted)r=   r%   r%   r&   r     s    z_LiveLoggingStreamHandler.reset)r   r!   c             C   s   || _ d| _|dkrd| _dS )z7Prepare for the given test phase (setup/call/teardown).Fr
  N)_when_section_name_shownr  )r=   r   r%   r%   r&   r    s    z"_LiveLoggingStreamHandler.set_when)rB   r!   c          	      s   | j r| j  nt }|x | js6| jd d| _n"| jdkrX| jsXd| _| jd | js| jr| jj	d| j ddd d| _t
 | W d Q R X d S )Nrh   T)r  r  z	live log -)sepr)   )r   Zglobal_and_fixture_disabledr   r  r   writer  r  r  sectionr0   r   )r=   rB   Zctx_manager)rA   r%   r&   r     s    
z_LiveLoggingStreamHandler.emitc             C   s   d S )Nr%   )r=   rB   r%   r%   r&   r   %  s    z%_LiveLoggingStreamHandler.handleError)rG   rH   rI   rJ   r   r   rU   r
   r   r1   r   rT   r  r;   rX   r   r   rY   r%   r%   )rA   r&   r     s   
r   c               @   s@   e Zd ZdZddddZeddddZejdd	d
dZ	dS )r   z5A logging handler used when live logging is disabled.N)r!   c             C   s   d S )Nr%   )r=   r%   r%   r&   r   -  s    z_LiveLoggingNullHandler.reset)r   r!   c             C   s   d S )Nr%   )r=   r   r%   r%   r&   r  0  s    z _LiveLoggingNullHandler.set_when)rB   r!   c             C   s   d S )Nr%   )r=   rB   r%   r%   r&   r   3  s    z#_LiveLoggingNullHandler.handleError)
rG   rH   rI   rJ   r   rT   r  r;   rX   r   r%   r%   r%   r&   r   *  s   r   )PrJ   r;   r   rV   r   
contextlibr   ior   pathlibr   typingr   r   r   r   r	   r
   r   r   r   Z_pytestr   Z_pytest._ior   Z_pytest.capturer   Z_pytest.compatr   r   Z_pytest.configr   r   r   r   r   Z_pytest.config.argparsingr   Z_pytest.deprecatedr   Z_pytest.fixturesr   r   Z_pytest.mainr   Z_pytest.storer   Z_pytest.terminalr   r   r   rW   r#   r   rT   rX   r   r'   r   r(   PercentStylerZ   ry   r   Handlerr   r   r  r   r   r   rS   r   r   r   FileHandlerr   r   NullHandlerr   r%   r%   r%   r&   <module>   st   

.b	V  _;