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

dœeÏD\Uã@s.dZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl	m
Z
ddl	mZddlm
Z
ddlmZddlmZmZddlmZmZmZdd	lmZmZmZdd
lmZddlmZmZGdd
„d
ƒZ Gdd„dej!ƒ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.e j/ge(ddde$de(ddde$de(dd e$d!e(d"d#de$d$e j0e j)e j1e j*e j+e j,e j2e j/e j3e j4e j5e j6e j7g
e(dd%de$d&e j0e j1e j*e j+e j,e j8e j9e j/e j3g	e(dd'de$d(e j0e j1e j*e j+e j,e j2e j:e j;e j4e j5e j6ge(dd)de$d*e j-e j<e j=e j>e j+e j?e j,e j@e jAe jBe jCge(d+d,de$d-e j1e j*e j+e j,e jDe j/e j6ge(dd.dd/œ
ZEdCd0d1„ZFd2\ZGZHZIGd3d4„d4ƒZJd5d6„ZKd7d8„ZLd9d:d;d<œZMdDd=d>„ZNejO Pd?d@¡ZQeQr*ddAlRmSZSeNZTdEdBd>„ZNdS)Fz%Command-line support for coverage.py.éN)ÚCoverage)Úenv)ÚCTracer)ÚCoverageConfig)Úcombinable_filesÚdebug_data_file)Úinfo_formatterÚinfo_headerÚshort_stack)Ú_BaseCoverageExceptionÚ_ExceptionDuringRunÚNoSource)ÚPyRunner)ÚNumbersÚshould_fail_underc@s~eZdZdZejdddddZejdddd	dZejdd
dddZejddd
dd 	d 
eej
ƒ¡¡dZejddd
dddZejddd
dddZejddd
dddZejddd
dddZejddd
d d!d"d#Zejd$d%dd&dZejd'd(dd)dZejdd*d
d+d,dZejd-d.dd/dZejd0d1dd2dZejd0d3dd4dZejdd5d
d+d6dZejd7dd
d8d9d:d;Zejd7dd
d8d9d<d;Zejdd=dd>dZejd?d@ddAdZejddBd
dCedDd#Z ejdEdFddGdZ!ejddHd
dIdZ"ejdJddKdZ#ejdLddMdZ$ejdNdOdPdQdRZ%ejdSddTdZ&ejdUd
dVdWdZ'ejddXd
dYdZdZ(ejdd[dd\dZ)ejdd]d
d^d_dZ*ejdd`ddadZ+dbS)cÚ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.z
--concurrencyÚstoreÚLIBSzaProperly measure code using a concurrency library. Valid values are: {}, or a comma-list of them.z, )rÚmetavarrz	--contextZLABELz2The context label to record for this coverage run.z
--contextszREGEX1,REGEX2,...ziOnly display data from lines covered in the given contexts. Accepts Python regexes, which must be quoted.z--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-mz--show-missingzEShow line numbers of statements in each module that weren't executed.z--modulezb<pyfile> is an importable Python module, not a script path, to be run as 'python -m' would run it.z--omitzhOmit files whose paths match one of these patterns. Accepts shell-style wildcards, which must be quoted.z-oÚoutfileZOUTFILEz=Write the XML report to this file. Defaults to 'coverage.xml')rÚdestrrz?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--precisionÚNzVNumber of digits after the decimal point to display for reported coverage percentages.z-qz--quietz-Don't print messages about what is happening.z--rcfilez„Specify configuration file. By default '.coveragerc', 'setup.cfg', 'tox.ini', and 'pyproject.toml' are tried. [env: COVERAGE_RCFILE]z--show-contextsz Show contexts for covered lines.z--skip-coveredzSkip files with 100% coverage.z--no-skip-coveredÚstore_falseÚskip_coveredzDisable --skip-covered.)rrrz--skip-emptyzSkip files with no code.z--sortZCOLUMNzbSort the report by the named column: name, stmts, miss, branch, brpart, or cover. Default is name.z--sourcez
SRC1,SRC2,...z=A list of directories or importable names of code to measure.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ÚbranchÚformatÚjoinÚsortedrZCONCURRENCY_CHOICESÚconcurrencyÚcontextÚcontextsÚdebugÚ	directoryÚ
fail_underrÚ
ignore_errorsÚincludeÚpylibÚshow_missingÚmoduleÚomitÚ
output_xmlÚoutput_jsonÚjson_pretty_printÚ
parallel_modeÚintÚ	precisionÚquietÚrcfileÚ
show_contextsrÚno_skip_coveredÚ
skip_emptyÚsortÚsourceÚtimidÚtitleÚversion©rHrHú/build/wlanpi-profiler-7IIg1Q/wlanpi-profiler-1.0.11/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.

    csftƒj|ddi|—Ž|jdddddddddddddddddddddddddddddd| ¡dS)NÚadd_help_optionFT)rr&r(r,r-r.r/r0r1rr2r3r'r6r7r;r=r4r>r?r@r5rrBrCrDrErFrG)ÚsuperÚ__init__Úset_defaultsÚdisable_interspersed_args)ÚselfÚargsÚkwargs)Ú	__class__rHrIrMÏsBzCoverageOptionParser.__init__c@seZdZdZdS)z&CoverageOptionParser.OptionParserErrorz;Used to stop the optparse error handler ending the process.N)r r!r"r#rHrHrHrIÚOptionParserErrorõsrTNcs8ytƒ ||¡\}}Wn|jk
r,dSXd||fS)zUCall optparse.parse_args, but return a triple:

        (ok, options, args)

        )FNNT)rLÚ
parse_argsrT)rPrQÚoptions)rSrHrIÚ
parse_args_okùs
z"CoverageOptionParser.parse_args_okcCst|ƒ|j‚dS)z7Override optparse.error so sys.exit doesn't get called.N)Ú	show_helprT)rPÚmsgrHrHrIÚerrorszCoverageOptionParser.error)NN)
r r!r"r#rMÚ	ExceptionrTrWrZÚ
__classcell__rHrH)rSrIrJÇs
&rJcs eZdZdZ‡fdd„Z‡ZS)ÚGlobalOptionParserz<Command-line parser for coverage.py global option arguments.cs tƒ ¡| tjtjg¡dS)N)rLrMÚadd_optionsrrrG)rP)rSrHrIrMs
zGlobalOptionParser.__init__)r r!r"r#rMr\rHrH)rSrIr]sr]cs:eZdZdZd	‡fdd„	Zdd„ZdZ‡fdd„Z‡ZS)
ÚCmdOptionParserz4Parse one of the new-style commands for coverage.py.NcsH|rd|}tƒj||d|jfd|i|p.i—Ž| |¡||_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)rLrMrNr^Úcmd)rPrrVÚdefaultsr`ra)rSrHrIrMs

zCmdOptionParser.__init__cCs|d|j›dkS)Nz<CmdOptionParser:ú>)rb)rPÚotherrHrHrIÚ__eq__.szCmdOptionParser.__eq__cstƒ ¡}|›d|j›S)z>Override of an undocumented function in optparse.OptionParser.ú )rLÚ
get_prog_namerb)rPÚprogram_name)rSrHrIrh5s
zCmdOptionParser.get_prog_name)NNN)	r r!r"r#rMrfÚ__hash__rhr\rHrH)rSrIr_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`raÚ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.)rarz	[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.)
rkrlr/rmrrnrorprqrrcCs,|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
|›dtjd	nX|rÜt| ¡ ¡ƒtƒn<t t |d¡¡ ¡}|r
t|jf|Žƒntd
|›ƒtdjf|ŽƒdS)z-Display an error message, or the named topic.rz__main__.pyz
-script.pyNrizwith C extensionZextension_modifierzwithout C extension)ÚfilezUse 'z help' for help.rzDon't know topic z"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Úgetr))rZÚtopicÚparserZprogram_pathriZauto_suffixZhelp_paramsZhelp_msgrHrHrIrXßs2



rX)rééc@s8eZdZdZdd„Zdd„Zdd„Zdd	„Zd
d„ZdS)
ÚCoverageScriptz*The command-line interface to coverage.py.cCsd|_d|_dS)NF)Ú
global_optionr€)rPrHrHrIrMszCoverageScript.__init__cCsN|stddtS|d d¡|_|jr0tƒ}n4t |d¡}|sXtd|d›ƒtS|dd…}| |¡\}}}|s|tS| 	|||¡rŽtSt
|jƒ}t
|jƒ}t
|j
ƒ}t
|jƒ}	t
|jƒ}
|jdk	rØ|j d¡}nd}t|j|j|j|j|j||||	|d	|j|jd

|_|jdkr&| |¡S|jdkr@|j ¡tS|jd
krX| ||¡S|jdkr¦|jrv|j  ¡|p~d}|jj!|d	t"|j#ƒd|j $¡tSt%t&|ƒ|j'|||
d}
t(j) *dd¡|j  ¡d}|jdkr|jj+f|j,|j-|j.|j/|j0dœ|
—Ž}nÄ|jdkr6|jj1fd|j2i|
—Žnž|jdkrp|jj3f|j2|j4|j-|j.|j5|j/dœ|
—Ž}nd|jdkrž|j6}|jj7f||j.dœ|
—Ž}n6|jdkrÐ|j6}|jj8f||j9|j5dœ|
—Ž}nt:‚|dk	rJ|j;dk	rú|j <d|j;¡|j =d¡}|j =d¡}t>|||ƒrJdj?t@|d A|¡||d }tBd!|ƒtCStS)"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: rŒNú,T)
Zdata_suffixZcover_pylibrEr(Úconfig_filerDr7r3r/r,Zcheck_preimportedr-Úmessagesr/rmrqrl)Ústrictr')Zmorfsr2r7r3r.rrp)r5rrBr=rCrkr0rn)r0rFrrBr@r=rr)rrBro)rÚpretty_printr@zreport:fail_underzreport:precisionz;total of {total} is less than fail-under={fail_under:.{p}f})r=)Útotalr1ÚpzCoverage failure:)DrXÚOKÚ
startswithrr]ÚCMDSr‰ÚERRrWÚdo_helpÚunshell_listrDr7r3r/r.r,Úsplitrr;r4rEr(r?r-r>r€rÚdo_debugrmÚdo_runr&ÚloadrlÚboolr'ÚsaverÚunglob_argsr2ruryÚinsertrpr5rrBr=rCrkr0Zhtml_reportrFr@rZ
xml_reportZjson_reportr–rtr1Z
set_optionÚ
get_optionrr)rZdisplay_coveredr‚Ú
FAIL_UNDER)rPrvr‹ÚokrVrQrDr7r3r/r.r,Z
data_pathsZreport_argsr—rr1r=rYrHrHrIÚcommand_linesÔ	



















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‹TrGF)rrrXrr›r‰rG)rPrVrQr‹ÚarHrHrIr¬s$





zCoverageScript.do_helpcCsT|sV|jrtdƒtS|j d¡}|dk	rVt |¡}|rV|ddkrVd|_|dd…}|sftdƒtS|jr„|j d	¡r„td
ƒtS|jdkrÂx2dD]*}t	||ƒdk	r”td
d|›dƒtSq”Wdt
jd<t|t
|jƒd}| ¡|jrö|j ¡|j ¡d}z.y| ¡Wntk
r.d}‚YnXWd|j ¡|rN|j ¡XtS)z!Implementation of 'coverage run'.zNo module specified for -mzrun:command_lineNr>ú-mú--moduleTrŒzNothing to do.zrun:parallelz,Can't append to data files in parallel mode.Úmultiprocessing)r(r3r7r4rDrEzROptions affecting multiprocessing must only be specified in a configuration file.
z	Remove --z from the command line.ÚtrueZCOVERAGE_RUN)Z	as_moduleF)r6rXrœr€r§ÚshlexrŸr&r,ÚgetattrrxÚenvironrr£Úpreparer¢Ústartrqr
Ústopr¤r™)rPrVrQrªÚopt_nameÚrunnerZcode_ranrHrHrIr¡ÍsN






zCoverageScript.do_runcCsH|stdƒtS|dd…r(tdƒtS|ddkrl|j ¡}ttdƒƒxøt|ƒD]}td|›ƒqTWnØ|ddkrºttdƒƒ|jjj}t	|ƒx¬t
|ƒD]}td	ƒt	|ƒq WnŠ|dd
krttd
ƒƒt|jjj 
¡ƒ}x\t|ƒD]}td|›ƒqðWn<|ddkr.ttdƒƒttƒƒntd|d›ƒtStS)
z#Implementation of 'coverage debug'.z<What information would you like: config, data, sys, premain?rŒNz Only one topic at a time, pleaserrurgÚdataz-----ÚconfigZpremainzDon't know what you mean by )rXrœr€Úsys_infor‚r	rr¹Ú	data_filerrr+rÚitemsr
r™)rPrQrºÚliner»ÚfilenameZconfig_inforHrHrIr s:

zCoverageScript.do_debugN)	r r!r"r#rMrªrr¡r rHrHrHrIrŽs!;rŽcCs"|sdStjr| d¡}| d¡S)z)Turn a command-line argument into a list.Nú'r’)rr}r…rŸ)ÚsrHrHrIrž-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&)rQZglobbedÚargrHrHrIr¥;s
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rGc
CsÊ|dkrtjdd…}ytƒ |¡}Wnžtk
rX}ztj|jŽt}Wdd}~XYnnt	k
rŽ}z|jd}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)rurvrŽrªrÚ	tracebackÚprint_exceptionrQrœrr‚Ú
SystemExit)rvÚstatusÚerrrYrHrHrIÚmainhs 
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ÚlimitrzÚcol)rÌZlaunchÚ
original_mainrÎr‚ÚshowÚcancel)rvZprofilerr¸Ú_rHrHrIrˎs)NNN)N)N)Ur#rÄr$rxÚos.pathr°rur†rÆr€rrZcoverage.collectorrZcoverage.configrZ
coverage.datarrZcoverage.debugrr	r
Zcoverage.exceptionsrrr
Zcoverage.execfilerZcoverage.resultsrrrÚOptionParserrJr]r_r/rr?ZGLOBAL_ARGSr0r2r3r7r&r'r>r.r1r=r@rrArBrFr9r:rCr5r(r,r-r6r4r;rDrEr8r›rXr™rœr¨rŽržr¥rˆrËr²r‰Z_profileZox_profile.core.launchersrÌrÑrHrHrHrIÚ<module>s$,D'
)
$!
!