Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
B

ί&	RO
¿ã@svdZddlZddlZddlmZmZddlmZm	Z	m
Z
ddlmZddd„Z
d	d
„Zddd„Zdd
d„Zdd„ZdS)aCoverage data for coverage.py.

This file had the 4.x JSON data support, which is now gone.  This file still
has storage-agnostic helpers, and is kept to avoid changing too many imports.
CoverageData is now defined in sqldata.py, and imported here to keep the
imports working.

éN)ÚCoverageExceptionÚNoDataError)Úfile_be_goneÚhuman_sortedÚplural)ÚCoverageDataFcCsFi}|rdd„}ntjj}x&| ¡D]}t| |¡ƒ|||ƒ<q$W|S)aHReturn a dict summarizing the line coverage data.

    Keys are based on the file names, and values are the number of executed
    lines.  If `fullpath` is true, then the keys are the full pathnames of
    the files, otherwise they are the basenames of the files.

    Returns a dict mapping file names to counts of lines.

    cSs|S)N©)ÚfrrúŒ/build/wlanpi-profiler-7IIg1Q/wlanpi-profiler-1.0.11/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/data.pyÚ<lambda>!ózline_counts.<locals>.<lambda>)ÚosÚpathÚbasenameZmeasured_filesÚlenÚlines)ÚdataÚfullpathZsummZfilename_fnÚfilenamerrr
Úline_countss

rcCsN| ¡r"| t| |¡pgƒ¡n| t| |¡p4gƒ¡| | |¡¡dS)zÊContribute `filename`'s data to the `hasher`.

    `hasher` is a `coverage.misc.Hasher` instance to be updated with
    the file's data.  It should only get the results data, not the run
    data.

    N)Úhas_arcsÚupdateÚsortedZarcsrÚfile_tracer)rrZhasherrrr
Úadd_data_to_hash)srcCs¢tj tj |¡¡\}}|p |g}g}xv|D]n}tj |¡rP| tj |¡¡q,tj |¡rŠtj tj |¡|›d¡}| t	 	|¡¡q,t
d|›dƒ‚q,W|S)zÃMake a list of data files to be combined.

    `data_file` is a path to a data file.  `data_paths` is a list of files or
    directories of files.

    Returns a list of absolute file paths.
    z.*z)Couldn't combine from non-existent path 'ú')r
rÚsplitÚabspathÚisfileÚappendÚisdirÚjoinÚextendÚglobr)Z	data_fileÚ
data_pathsÚdata_dirÚlocalÚfiles_to_combineÚpÚpatternrrr
Úcombinable_files8s

r*cCsBt| ¡|ƒ}|r|stdƒ‚d}x|D]ü}|| ¡krZ|j d¡r*|j d|›¡q*|j d¡rx|j d|›¡yt||jd}	|	 ¡Wn6t	k
rÈ}
z|j
r¸| 
t|
ƒ¡Wdd}
~
XYq*X|j|	|d|d	7}|rú|d
t
j |¡›ƒ|s*|j d¡r|j d|›¡t|ƒq*W|r>|s>tdƒ‚dS)
a¸Combine a number of data files together.

    `data` is a CoverageData.

    Treat `data.filename` as a file prefix, and combine the data from all
    of the data files starting with that prefix plus a dot.

    If `aliases` is provided, it's a `PathAliases` object that is used to
    re-map paths to match the local machine's.

    If `data_paths` is provided, it is a list of directories or files to
    combine.  Directories are searched for files that start with
    `data.filename` plus dot as a prefix, and those files are combined.

    If `data_paths` is not provided, then the directory portion of
    `data.filename` is used as the directory to search for data files.

    Unless `keep` is True every data file found and combined is then deleted from disk. If a file
    cannot be read, a warning will be issued, and the file will not be
    deleted.

    If `strict` is true, and no files are found to combine, an error is
    raised.

    zNo data to combinerZdataiozSkipping combining ourself: zCombining data file )ÚdebugN)ÚaliasesézCombined data file zDeleting combined data file zNo usable data files)r*Ú
base_filenamerÚ
data_filenameÚ_debugZshouldÚwriterÚreadrÚ_warnÚstrrr
rÚrelpathr)rr,r$ÚstrictZkeepÚmessager'Zfiles_combinedr	Znew_dataÚexcrrr
Úcombine_parallel_dataOs6 r9cCsàt|ƒ}| ¡}td|›ƒtj |¡s6tdƒdS| ¡td| ¡›ƒt|dd}t	| 
¡ƒ}t|ƒ}t|›dt|ƒ›dƒxR|D]J}|›d	||›d
t||ƒ›}| 
|¡}|rÐ|d|›d7}t|ƒqŽWdS)
z(Implementation of 'coverage debug data'.zpath: z%No data collected: file doesn't existNz
has_arcs: T)rz fileú:z: z linez [ú])rr/Úprintr
rÚexistsr2rrrÚkeysrrr)rrÚsummaryÚ	filenamesZnfilesr	ÚlineZpluginrrr
Údebug_data_files$
 
rB)F)N)NNFFN)Ú__doc__r#Úos.pathr
Zcoverage.exceptionsrrZ
coverage.miscrrrZcoverage.sqldatarrrr*r9rBrrrr
Ú<module>s


@