Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/coverage/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/coverage/__pycache__/summary.cpython-37.pyc

B

E�WF�@sXdZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZGdd�de�ZdS)	zSummary reporting�N)�env)�Reporter)�Numbers)�	NotPython�CoverageException�output_encodingcs*eZdZdZ�fdd�Zddd�Z�ZS)�SummaryReporterz*A reporter for writing the summary report.cs"tt|��||�|j��|_dS)N)�superr�__init__�dataZhas_arcs�branches)�self�coverage�config)�	__class__��C/opt/alt/python37/lib64/python3.7/site-packages/coverage/summary.pyr
szSummaryReporter.__init__Nc	s�|�|�}tdd�|D�dg�}d|}d}d}|dd}|d	}	|jr\|d
7}|	d7}	t��}
|d|
d
df7}|	d|
df7}	|jjr�|d7}|	d7}	dt|�}tddddd�}|jr�|�	tdd
d���dkr�t
j��fdd�}
|
|�|
|�g}t�}d}�xv|D�]l}y�|j�
|�}|j}||7}|jj�rn|jdk}|jdk}|�rn|�rn|d7}�w|��|j|jf}|j�r�||j|jf7}||jf7}|jj�r�|��}|j�r�|��}|�r�|�r�|d7}||7}||f7}|	|}||jf7}|�||f�Wnptk
�r�|jj}|�r^t
��dd�\}}|tk�r^|���s^d}|�r||
||��|j|f�YnX�qWt |jdd��r�|�!|jj"�#����dk�r�t$d �%|jj"���|j"�fd!d"�d#�x|D]}|
|d��q�W|j&dk�rZ|
|�d$|j|jf}|j�r0||j|jf7}||jf7}|jj�rN|d%7}|
|	|�|j&�sp|�spt$d&��|jj�r�|�r�|
|||dk�r�d'nd(f�|j�o�|jS))z�Writes a report summarizing coverage statistics per module.

        `outfile` is a file object to write the summary to. It must be opened
        for native strings (bytes on Python 2, Unicode on Python 3).

        cSsg|]}t|����qSr)�len�relative_filename)�.0�frrrr�
<listcomp>sz*SummaryReporter.report.<locals>.<listcomp>�z	%%- %ds  z%s   %s: %sz,
%s file%s skipped due to complete coverage.�Namez
 Stmts   Missz%6d %6dz Branch BrPartz %6d %6dz%*s�ZCoverz	%%%ds%%%%�z
   Missingz   %s�-r�����)�nameZstmtsZmissZcover)�branchZbrpartNcs.tjr|�t��}��|�����d�dS)z-Write a line to the output, adding a newline.�
N)r�PY2�encoder�write�rstrip)�line)�outfilerr�writeout8sz(SummaryReporter.report.<locals>.writeoutz, F�sortzInvalid sorting option: {0!r}cs|d�|dfS)Nrrr)�l)�positionrr�<lambda>z�z(SummaryReporter.report.<locals>.<lambda>)�keyZTOTAL)�zNo data to report.�sr0)'Zfind_file_reporters�maxrrZpc_str_widthrZshow_missingr�dict�update�sys�stdoutrZ_analyze�numbersZskip_coveredZ	n_missingZn_partial_branchesrZn_statementsZ
n_branchesZpc_covered_strZmissing_formattedZarcs_missing_formattedZ
pc_covered�append�	Exception�
ignore_errors�exc_inforZshould_be_python�__name__�getattr�getr*�lowerr�formatZn_files)r
Zmorfsr(Zfile_reportersZmax_nameZfmt_nameZfmt_errZfmt_skip_covered�headerZfmt_coverageZwidth100ZruleZcolumn_orderr)�lines�totalZ
skipped_countrZanalysis�numsZno_missing_linesZno_missing_branches�argsZmissing_fmtdZ
branches_fmtd�textZ	report_it�typ�msgr'r)r(r,r�reports�






$


zSummaryReporter.report)N)r<�
__module__�__qualname__�__doc__r
rI�
__classcell__rr)rrrsr)
rLr5rrZcoverage.reportrZcoverage.resultsrZ
coverage.miscrrrrrrrr�<module>s