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

MðÝåÞd;‘ã@sdZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZddlm
Z
ddlmZddlmZddlmZmZmZdd	lmZdd
lmZmZmZmZddlmZGdd
„d
eƒZ Gdd„dej!eƒZ"Gdd„de"ƒZ#Gdd„de"ƒZ$e j%e j&e j'gZ(e$de j)e j*e j+e j,ge(ddde$de j-e j.ge(ddde$de(ddde$de(dd e$d!e(d"d#de$d$e j/e j)e j0e j*e j+e j,e j1e j2e j3e j4e j5e j6ge(dd%de$d&e j/e j0e j*e j+e j,e j7e j8e j2ge(dd'de$d(e j/e j0e j*e j+e j,e j1e j9e j:e j3e j4e j5ge(dd)de$d*e j-e j;e j<e j=e j+e j>e j,e j?e j@e jAe jBge(d+d,de$d-e j0e j*e j+e j,e jCe j5ge(dd.dd/œ
ZDdCd0d1„ZEd2\ZFZGZHGd3d4„d4eƒZId5d6„ZJd7d8„ZKd9d:d;d<œZLdDd=d>„ZMejN Od?d@¡ZPePrddAlQmRZReMZSdEdBd>„ZMdS)Fz%Command-line support for coverage.py.é)Úprint_functionN)ÚCoverage)Úenv)ÚCTracer)Úline_counts)Úinfo_formatterÚinfo_headerÚshort_stack)ÚPyRunner)ÚBaseCoverageExceptionÚExceptionDuringRunÚNoSourceÚoutput_encoding)Úshould_fail_underc
@steZdZdZejdddddZejdddd	dZejdd
dddZdd
dddgZ	ejdddde	dd 
e	¡dZejddddddZejddddddZ
ejdddd d!dZejdd"dd#d$d%d&Zejd'd(dd)dZejd*d+dd,dZejdd-dd.d/dZejd0d1dd2dZejd3dd4d5dZejd6d7dd8dZejd9dd:dZejd;d<d=d>d?Zejd@ddAdZejdBddCdZejddDdd.dEdZejddFddGdHdZejdIdddJdKdLdMZejdIdddJdKdNdMZejddOddPdZejdQdRddSdZejd6dTddUdZ ejddVddWe!dXd&Z"ejddYddZdZ#ejdd[dd\d]dZ$ejdd^dd_dZ%ejdd`ddadbdZ&ejddcddddZ'deS)fÚOptszBA namespace class for individual options we'll build parsers from.z-az--appendÚ
store_truezGAppend coverage data to .coverage, otherwise it starts clean each time.)ÚactionÚhelpÚz--keepz9Keep original coverage files, otherwise they are deleted.z--branchz:Measure branch coverage in addition to statement coverage.ÚthreadZgeventZgreenletZeventletÚmultiprocessingz
--concurrencyÚstoreZLIBzHProperly measure code using a concurrency library. Valid values are: %s.z, )rÚmetavarÚchoicesrz	--contextZLABELz2The context label to record for this coverage run.)rrrz--debugZOPTSz9Debug options, separated by commas. [env: COVERAGE_DEBUG]z-dz--directoryZDIRzWrite the output files to DIR.z--fail-underZMINÚfloatz?Exit with a status of 2 if the total coverage is less than MIN.)rrÚtyperz-hz--helpzGet help on this command.z-iz--ignore-errorsz)Ignore errors while reading source files.z	--includez
PAT1,PAT2,...zpInclude only files whose paths match one of these patterns. Accepts shell-style wildcards, which must be quoted.z-Lz--pylibzWMeasure coverage even inside the Python installed library, which isn't done by default.z--sortZCOLUMNzbSort the report by the named column: name, stmts, miss, branch, brpart, or cover. Default is name.z-mz--show-missingzEShow line numbers of statements in each module that weren't executed.z--skip-coveredzSkip files with 100% coverage.z--no-skip-coveredÚstore_falseÚskip_coveredzDisable --skip-covered.)rÚdestrz--skip-emptyzSkip files with no code.z--show-contextsz Show contexts for covered lines.z--omitzhOmit files whose paths match one of these patterns. Accepts shell-style wildcards, which must be quoted.z
--contextszREGEX1,REGEX2,...ziOnly display data from lines covered in the given contexts. Accepts Python regexes, which must be quoted.z-oÚoutfileZOUTFILEz=Write the XML report to this file. Defaults to 'coverage.xml')rrrrz?Write the JSON report to this file. Defaults to 'coverage.json'z--pretty-printz"Format the JSON for human readers.z-pz--parallel-modez†Append the machine name, process id and random number to the .coverage data file name to simplify collecting data from many processes.z--modulezb<pyfile> is an importable Python module, not a script path, to be run as 'python -m' would run it.z--precisionÚNzVNumber of digits after the decimal point to display for reported coverage percentages.z--rcfilez„Specify configuration file. By default '.coveragerc', 'setup.cfg', 'tox.ini', and 'pyproject.toml' are tried. [env: COVERAGE_RCFILE]z--sourcez
SRC1,SRC2,...z9A list of packages or directories of code to be measured.z--timidzXUse a simpler but slower trace method. Try this if you get seemingly impossible results!z--titleZTITLEz.A text string to use as the title on the HTML.z	--versionz%Display version information and exit.N)(Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚoptparseÚmake_optionÚappendÚkeepÚbranchZCONCURRENCY_CHOICESÚjoinÚconcurrencyÚcontextÚdebugÚ	directoryÚ
fail_underrÚ
ignore_errorsÚincludeÚpylibÚsortÚshow_missingrÚno_skip_coveredÚ
skip_emptyÚ
show_contextsÚomitÚcontextsÚ
output_xmlÚoutput_jsonÚjson_pretty_printÚ
parallel_modeÚmoduleÚintÚ	precisionÚrcfileÚsourceÚtimidÚtitleÚversion©rFrFúŽ/build/wlanpi-profiler-MIf3Xw/wlanpi-profiler-1.0.8/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/cmdline.pyrsÌ

rcsFeZdZdZ‡fdd„ZGdd„deƒZd‡fdd„	Zd	d
„Z‡Z	S)ÚCoverageOptionParserz|Base OptionParser for coverage.py.

    Problems don't exit the program.
    Defaults are initialized for all options.

    cshtt|ƒj|ddi|—Ž|jddddddddddddddddddddddddddddd| ¡dS)NÚadd_help_optionFT)rr'r)r+r,r-r.r/rr0r1r(r>r8r9r=r@r2rAr4rr6r7r3rBrCrDrE)ÚsuperrHÚ__init__Úset_defaultsÚdisable_interspersed_args)ÚselfÚargsÚkwargs)Ú	__class__rFrGrKÎs@
zCoverageOptionParser.__init__c@seZdZdZdS)z&CoverageOptionParser.OptionParserErrorz;Used to stop the optparse error handler ending the process.N)r!r"r#r$rFrFrFrGÚOptionParserErrorósrRNcs<ytt|ƒ ||¡\}}Wn|jk
r0dSXd||fS)zUCall optparse.parse_args, but return a triple:

        (ok, options, args)

        )FNNT)rJrHÚ
parse_argsrR)rNrOÚoptions)rQrFrGÚ
parse_args_ok÷s
z"CoverageOptionParser.parse_args_okcCst|ƒ|j‚dS)z7Override optparse.error so sys.exit doesn't get called.N)Ú	show_helprR)rNÚmsgrFrFrGÚerrorszCoverageOptionParser.error)NN)
r!r"r#r$rKÚ	ExceptionrRrUrXÚ
__classcell__rFrF)rQrGrHÆs
%rHcs eZdZdZ‡fdd„Z‡ZS)ÚGlobalOptionParserz<Command-line parser for coverage.py global option arguments.cs$tt|ƒ ¡| tjtjg¡dS)N)rJr[rKÚadd_optionsrrrE)rN)rQrFrGrKszGlobalOptionParser.__init__)r!r"r#r$rKrZrFrF)rQrGr[	sr[cs:eZdZdZd	‡fdd„	Zdd„ZdZ‡fdd„Z‡ZS)
ÚCmdOptionParserz4Parse one of the new-style commands for coverage.py.NcsL|rd|}tt|ƒj||d|jfd|i|p2i—Ž| |¡||_dS)aoCreate an OptionParser for a coverage.py command.

        `action` is the slug to put into `options.action`.
        `options` is a list of Option's for the command.
        `defaults` is a dict of default value for options.
        `usage` is the usage string to display in help.
        `description` is the description of the command, for the help text.

        z%prog )ÚusageÚdescriptionrN)rJr]rKrLr\Úcmd)rNrrTÚdefaultsr^r_)rQrFrGrKs


zCmdOptionParser.__init__cCs|d|jkS)Nz<CmdOptionParser:%s>)r`)rNÚotherrFrFrGÚ__eq__,szCmdOptionParser.__eq__cstt|ƒ ¡}dj||jdS)z>Override of an undocumented function in optparse.OptionParser.z{command} {subcommand})ÚcommandÚ
subcommand)rJr]Ú
get_prog_nameÚformatr`)rNÚprogram_name)rQrFrGrf3szCmdOptionParser.get_prog_name)NNN)	r!r"r#r$rKrcÚ__hash__rfrZrFrF)rQrGr]s
r]Úannotatez[options] [modules]z|Make annotated copies of the given files, marking statements that are executed with > and statements that are missed with !.)r^r_Úcombinez%[options] <path1> <path2> ... <pathN>a?Combine data from multiple coverage files collected with 'run -p'.  The combined results are written to a single file representing the union of the data. The positional arguments are data files or directories containing data files. If no paths are provided, data files in the default data file's directory are combined.r-z<topic>aDisplay information about the internals of coverage.py, for diagnosing problems. Topics are: 'data' to show a summary of the collected data; 'sys' to show installation information; 'config' to show the configuration; 'premain' to show what is calling coverage.Úerasez)Erase previously collected coverage data.)r_rz	[command]zDescribe how to use coverage.pyÚhtmlz™Create an HTML report of the coverage of the files.  Each file gets its own page, with the source decorated to show executed, excluded, and missed lines.Újsonz+Generate a JSON report of coverage results.Úreportz&Report coverage statistics on modules.Úrunz$[options] <pyfile> [program options]z/Run a Python program, measuring code execution.Úxmlz+Generate an XML report of coverage results.)
rjrkr-rlrrmrnrorprqcCs(|s|s|st‚tjd}| tjjd¡r8tj |¡}tj |¡}t	j
rjd}| |¡rj|dt|ƒ…}tt
jƒ}||d<tdk	rŽd|d<nd|d<|r¾t|tjd	td
|ftjd	nV|rÚt| ¡ ¡ƒtƒn:t t |d¡¡ ¡}|rt|jf|Žƒntd|ƒtd
jf|ŽƒdS)z-Display an error message, or the named topic.rz__main__.pyz
-script.pyNrhzwith C extensionZextension_modifierzwithout C extension)ÚfilezUse '%s help' for help.rzDon't know topic %rz"Full documentation is at {__url__})ÚAssertionErrorÚsysÚargvÚendswithÚosÚpathÚsepÚdirnameÚbasenamerÚWINDOWSÚlenÚdictÚcoverageÚ__dict__rÚprintÚstderrÚformat_helpÚstripÚtextwrapÚdedentÚHELP_TOPICSÚgetrg)rXÚtopicÚparserZprogram_pathrhZauto_suffixZhelp_paramsZhelp_msgrFrFrGrVÙs2



rV)rééc@s8eZdZdZdd„Zdd„Zdd„Zdd	„Zd
d„ZdS)
ÚCoverageScriptz*The command-line interface to coverage.py.cCsd|_d|_dS)NF)Ú
global_optionr)rNrFrFrGrKszCoverageScript.__init__cCs|stddtS|d d¡|_|jr0tƒ}n2t |d¡}|sVtd|dƒtS|dd…}| |¡\}}}|sztS| 	|||¡rŒtSt
|jƒ}t
|jƒ}t
|j
ƒ}t
|jƒ}	t
|jƒ}
t|j|j|j|j|j||||	|jd|jd	|_|jd
kr| |¡S|jdkr|j ¡tS|jdkr6| ||¡S|jd
kr„|jrT|j ¡|p\d}|jj|dt |j!ƒd|j "¡tSt#t$|ƒ|j%|||
d}t&j' (dd¡|j ¡d}
|jdkrî|jj)f|j*|j+|j,|j-|j.dœ|—Ž}
n¾|jdkr|jj/fd|j0i|—Žn˜|jdkrN|jj1f|j0|j2|j+|j,|j3|j-dœ|—Ž}
n^|jdkr||j4}|jj5f||j,dœ|—Ž}
n0|jdkr¬|j4}|jj6f||j7|j3dœ|—Ž}
|
dk	r|j8dk	rÒ|j 9d|j8¡|j :d¡}|j :d¡}t;|
||ƒrdj<|
||d}t=d|ƒt>StS) z¯The bulk of the command line interface to coverage.py.

        `argv` is the argument list to process.

        Returns 0 if all is well, 1 if something went wrong.

        Úminimum_help)r‰rú-zUnknown command: '%s'r‹NT)Zdata_suffixZcover_pylibrCr)Úconfig_filerBr8r1r-r+Zcheck_preimportedr,r-rlrprk)Ústrictr()Zmorfsr0r8r1r9rro)r4rr6r@r3rjr.rm)r.rDrr6r7r@rq)rr6rn)rÚpretty_printr7zreport:fail_underzreport:precisionzAtotal of {total:.{p}f} is less than fail-under={fail_under:.{p}f})Útotalr/ÚpzCoverage failure:)?rVÚOKÚ
startswithrŽr[ÚCMDSrˆÚERRrUÚdo_helpÚunshell_listrBr8r1r-r9rr=r2rCr)rAr+r,rrÚdo_debugrlÚdo_runr'ÚloadrkÚboolr(Úsaver~Úunglob_argsr0rtrxÚinsertror4rr6r@r3rjr.Zhtml_reportrDr7rZ
xml_reportZjson_reportr“r/Z
set_optionÚ
get_optionrrgrÚ
FAIL_UNDER)rNrurŠÚokrTrOrBr8r1r-r9Z	data_dirsZreport_argsr”rr/r@rWrFrFrGÚcommand_linesÆ	

















zCoverageScript.command_linecCsŽ|jr&|jrtddn
t|ddS|jdkrv|rhx<|D](}t |¡}|rXt|dq:t|dq:Wn
tdddS|jrŠtdddSdS)z`Deal with help requests.

        Return True if it handled the request, False if not.

        r)r‰)rŠTrEF)rrŽrVrr˜rˆrE)rNrTrOrŠÚarFrFrGrš›s$





zCoverageScript.do_helpcCsD|sV|jrtdƒtS|j d¡}|dk	rVt |¡}|rV|ddkrVd|_|dd…}|sftdƒtS|jr„|j d	¡r„td
ƒtS|jdkr¼x,dD]$}t	||ƒdk	r”td
 
|¡ƒtSq”Wt|t|jƒd}| 
¡|jræ|j ¡|j ¡d}z.y| ¡Wntk
rd}‚YnXWd|j ¡|r>|j ¡XtS)z!Implementation of 'coverage run'.zNo module specified for -mzrun:command_lineNrz-mTr‹zNothing to do.zrun:parallelz,Can't append to data files in parallel mode.r)r)r1r8r2rBrCztOptions affecting multiprocessing must only be specified in a configuration file.
Remove --{} from the command line.)Z	as_moduleF)r>rVr™rr£ÚshlexÚsplitr'r+Úgetattrrgr
rŸÚprepareržÚstartrpr
Ústopr r–)rNrTrOr¦Úopt_nameÚrunnerZcode_ranrFrFrGr¼sL





zCoverageScript.do_runcCs¢|stdƒtSxŠ|D]€}|dkr\|j ¡}ttdƒƒxt|ƒD]}td|ƒqFWq|dkr"|j ¡|j ¡}ttdƒƒtd| 	¡ƒ|rtd| 
¡ƒt|dd}t| 
¡ƒ}td	t|ƒƒxJ|D]8}d
|||f}| |¡}	|	r
|d|	7}t|ƒqÚWntdƒq|d
krhttd
ƒƒ|jjj ¡}
xRt|
ƒD]}td|ƒqPWq|dkrŠttdƒƒttƒƒqtd|ƒtSqWtS)z#Implementation of 'coverage debug'.z<What information would you like: config, data, sys, premain?rtz %sÚdatazpath: %szhas_arcs: %rT)Úfullpathz

%d files:z%s: %d linesz [%s]zNo data collectedÚconfigZpremainzDon't know what you mean by %r)rVr™rÚsys_inforrrržÚget_dataZ
data_filenameZhas_arcsrÚsortedÚkeysr}Zfile_tracerr²r€Úitemsr	r–)rNrOÚinfor³Úliner°ÚsummaryÚ	filenamesÚfZpluginZconfig_inforFrFrGrœõsJ








zCoverageScript.do_debugN)	r!r"r#r$rKr¦ršrrœrFrFrFrGrs!9rcCs"|sdStjr| d¡}| d¡S)z)Turn a command-line argument into a list.Nú'ú,)rr|r„r©)ÚsrFrFrGr›#s

r›cCsLtjrHg}x8|D]0}d|ks$d|kr6| t |¡¡q| |¡qW|}|S)z5Interpret shell wildcards for platforms that need it.ú?Ú*)rr|ÚextendÚglobr')rOZglobbedÚargrFrFrGr¡1s
r¡aª        Coverage.py, version {__version__} {extension_modifier}
        Measure, collect, and report on code coverage in Python programs.

        usage: {program_name} <command> [options] [args]

        Commands:
            annotate    Annotate source files with execution information.
            combine     Combine a number of data files.
            debug       Display information about the internals of coverage.py
            erase       Erase previously collected coverage data.
            help        Get help on using coverage.py.
            html        Create an HTML report.
            json        Create a JSON report of coverage results.
            report      Report coverage stats on modules.
            run         Run a Python program and measure code execution.
            xml         Create an XML report of coverage results.

        Use "{program_name} help <command>" for detailed help on any command.
    zw        Code coverage for Python, version {__version__} {extension_modifier}.  Use '{program_name} help' for help.
    zD        Coverage.py, version {__version__} {extension_modifier}
    )rrrEc
CsÜ|dkrtjdd…}ytƒ |¡}Wn°tk
rX}ztj|jŽt}Wdd}~XYn€t	k
r }z,|jd}t
jr„| t
ƒ¡}t|ƒt}Wdd}~XYn8tk
rÖ}z|jrÂ|jd}nd}Wdd}~XYnX|S)z\The main entry point to coverage.py.

    This is installed as the script entry point.

    Nr‹r)rtrurr¦rÚ	tracebackÚprint_exceptionrOr™rrÚPY2ÚencoderrÚ
SystemExit)ruÚstatusÚerrrWrFrFrGÚmain^s$
rÌZCOVERAGE_PROFILEr)ÚSimpleLauncherc
CsHt ¡}zt|ƒS|jddd\}}t|j|ddddƒ| ¡XdS)z$A wrapper around main that profiles.Nréd)Z	re_filterZmax_recordsr)ÚqueryÚlimitryÚcol)rÍZlaunchÚ
original_mainrÏrÚshowÚcancel)ruZprofilerr°Ú_rFrFrGr̆s)NNN)N)N)Tr$Ú
__future__rrÃr%Úos.pathrwr¨rtr…rÅrrrZcoverage.collectorrZ
coverage.datarZcoverage.debugrrr	Zcoverage.execfiler
Z
coverage.miscrrr
rZcoverage.resultsrÚobjectrÚOptionParserrHr[r]r-rrAZGLOBAL_ARGSr.r0r1r8r'r(r9r/r@r7rr5r6rDr;r<r3r4r)r+r,r>r2r=rBrCr:r˜rVr–r™r¤rr›r¡r‡rÌÚenvironrˆZ_profileZox_profile.core.launchersrÍrÒrFrFrFrGÚ<module>s,C'	

)
 !
#