Repository URL to install this package:
Version:
1.0.8-1 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
coverage
/
__pycache__
/
summary.cpython-37.pyc
|
---|
B IÌà;ã @ sT d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z m Z G dd deZdS ) zSummary reportingé N)Úenv)Úget_analysis_to_report)ÚNumbers)ÚCoverageExceptionÚoutput_encodingc @ s2 e Zd ZdZdd Zdd ZdddZd d ZdS )ÚSummaryReporterz*A reporter for writing the summary report.c C sH || _ | j j| _| ¡ ¡ | _d | _g | _d| _d| _t | _ d| _d S )Nr z%s %s: %s)ÚcoverageÚconfigÚget_dataZhas_arcsÚbranchesÚoutfileÚfr_analysisÚ skipped_countÚempty_countr ÚtotalZfmt_err)Úselfr © r ú/build/wlanpi-profiler-MIf3Xw/wlanpi-profiler-1.0.8/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/summary.pyÚ__init__ s zSummaryReporter.__init__c C s2 t jr| t ¡}| j | ¡ ¡ | j d¡ dS )z-Write a line to the output, adding a newline.Ú N)r ÚPY2Úencoder r ÚwriteÚrstrip)r Úliner r r Úwriteout s zSummaryReporter.writeoutNc s~ |pt j| _| j ¡ | jj¡ x$t| j|D ]\}}| ||¡ q.W t dd | jD dg }d| }d}d}|d d } |d } | jr| d 7 } | d7 } t ¡ }| d|d df 7 } | d|d f 7 } | jjrà| d7 } | d7 } dt| }tddddd} | jr| tdd d¡ | | ¡ | |¡ g }x| jD ]\}}|j}| ¡ |j|jf}| jrn||j|jf7 }||jf7 }| jjr||jddf7 }| | }||jf7 }| ||f¡ q6W t| jddrT| jj ¡ }d}|d dkrþd}|dd }n|d dkr|dd }| !|¡ dkr>t"d #| jj¡|j fd!d"|d# x|D ]}| |d ¡ qZW | j$j%dkræ| |¡ d$| j$j| j$jf}| jr¸|| j$j| j$jf7 }|| j$jf7 }| jjrØ|d%7 }| | | ¡ | j$j%s | j&s t"d&| jj'r6| j&r6| || j&| j&dkr,d'nd(f ¡ | jj(rl| j)rl| || j)| j)dkrbd'nd(f ¡ | j$jo|| j$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). c S s g | ]\}}t | ¡ qS r )ÚlenÚrelative_filename)Ú.0ÚfrÚanalysisr r r ú <listcomp>1 s z*SummaryReporter.report.<locals>.<listcomp>é z %%- %ds z, %s file%s skipped due to complete coverage.z %s empty file%s skipped.ÚNamez Stmts Missz%6d %6dz Branch BrPartz %6d %6dz%*sé ZCoverz %%%ds%%%%é z Missingz %sú-r é é éÿÿÿÿ)ÚnameZstmtsZmissZcover)ÚbranchZbrpartT)r ÚsortNFú+zInvalid sorting option: {!r}c s | d | d fS )Nr' r r )Úl)Úpositionr r Ú<lambda>k ó z(SummaryReporter.report.<locals>.<lambda>)ÚkeyÚreverseZTOTAL)Ú zNo data to report.Úsr4 )*ÚsysÚstdoutr r r Zset_query_contextsr Zreport_contextsr Úreport_one_fileÚmaxr r r Zpc_str_widthZshow_missingr ÚdictÚupdater Únumbersr Ún_statementsÚ n_missingZ n_branchesÚn_partial_branchesZpc_covered_strZmissing_formattedZ pc_coveredÚappendÚgetattrr, ÚlowerÚgetr Úformatr Zn_filesr Úskip_coveredÚ skip_emptyr )r Zmorfsr r r Zmax_nameZfmt_nameZfmt_skip_coveredZfmt_skip_emptyÚheaderZfmt_coverageZwidth100ZruleZcolumn_orderÚlinesÚnumsÚargsÚtextZsort_optionr3 r r )r/ r Úreport# s zSummaryReporter.reportc C s~ |j }| j|7 _|jdk}|jdk}| jjrH|rH|rH| jd7 _n2| jjrj|jdkrj| j d7 _ n| j ||f¡ dS )z4Report on just one file, the callback from report().r r' N)r<