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

°։Z"“ÜAã@s.dZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZddl
mZmZddlmZmZddlmZddlmZmZdd	lmZmZdd
lmZmZmZddlm Z ddl!m"Z"m#Z#m$Z$m%Z%dd
l&m'Z'ddl(m)Z)ddl*m+Z+ddl,m-Z-m.Z.m/Z/ddl,m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:ddl;m<Z<m=Z=ddl>m?Z?ddl@mAZAyddlBmCZCWneDk
r®dZCYnXe2eƒZejEdd„ƒZFe0dƒZGGdd„deHƒZIeJejK Ldd¡ƒrdd lmMZMmNZNeMeNd!d"d#gd$eIƒZId%d&„ZOd'd(„ZPdS))z#Core control stuff for coverage.py.éN)Úenv)ÚAnnotateReporter)Ústring_classÚiitems)Ú	CollectorÚCTracer)Úread_coverage_config)Ú"should_start_context_test_functionÚcombine_context_switchers)ÚCoverageDataÚcombine_parallel_data)ÚDebugControlÚshort_stackÚwrite_formatted_info)Údisposition_debug_msg)ÚPathAliasesÚabs_fileÚrelative_filenameÚset_relative_directory)ÚHtmlReporter)ÚInOrOut)ÚJsonReporter)ÚCoverageExceptionÚbool_or_noneÚ
join_regex)ÚDefaultValueÚensure_dir_for_fileÚisolate_module)ÚFileReporter)ÚPlugins)ÚPythonFileReporter)Ú
render_report)ÚAnalysisÚNumbers)ÚSummaryReporter)ÚXmlReporter)Úpatch_multiprocessingcks8|j}|j ¡|_z|jjf|ŽdVWd||_XdS)zÇTemporarily tweak the configuration of `cov`.

    The arguments are applied to `cov.config` with the `from_args` method.
    At the end of the with-statement, the old configuration is restored.
    N)ÚconfigÚcopyZ	from_args)ÚcovÚkwargsZoriginal_config©r+úŽ/build/wlanpi-profiler-MIf3Xw/wlanpi-profiler-1.0.8/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/control.pyÚoverride_config.s
r-ÚMISSINGc@s~eZdZdZgZedd„ƒZeddddddddddddddfdd„Zd	d
„Z	dd„Z
d
d„Zdd„Zdd„Z
dRdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„ZdSd*d+„ZdTd,d-„Zd.d/„Zd0d1„ZdUd2d3„Zd4d5„ZdVd6d7„Zd8d9„Z d:d;„Z!d<d=„Z"d>d?„Z#d@dA„Z$dBdC„Z%dWdDdE„Z&dXdFdG„Z'dYdHdI„Z(dZdJdK„Z)d[dLdM„Z*d\dNdO„Z+dPdQ„Z,dS)]ÚCoverageaÁProgrammatic access to coverage.py.

    To use::

        from coverage import Coverage

        cov = Coverage()
        cov.start()
        #.. call your code ..
        cov.stop()
        cov.html_report(directory='covhtml')

    Note: in keeping with Python custom, names starting with underscore are
    not part of the public API. They might stop working at any point.  Please
    limit yourself to documented methods to avoid problems.

    cCs|jr|jdSdSdS)zŽGet the latest started `Coverage` instance, if any.

        Returns: a `Coverage` instance, or None.

        .. versionadded:: 5.0

        éÿÿÿÿN)Ú
_instances)Úclsr+r+r,ÚcurrentVs	
zCoverage.currentNFTcCsÖ|dk|_|tkrd}t|||||t|ƒ||	|
|||
||
|d|_d|_||_|_||_d|_	d|_
||_d|_g|_
d|_|_d|_d|_d|_|_d|_d|_d|_d|_d|_d|_d|_tjsÒtƒdS)aL
        Many of these arguments duplicate and override values that can be
        provided in a configuration file.  Parameters that are missing here
        will use values from the config file.

        `data_file` is the base name of the data file to use. The config value
        defaults to ".coverage".  None can be provided to prevent writing a data
        file.  `data_suffix` is appended (with a dot) to `data_file` to create
        the final file name.  If `data_suffix` is simply True, then a suffix is
        created with the machine and process identity included.

        `cover_pylib` is a boolean determining whether Python code installed
        with the Python interpreter is measured.  This includes the Python
        standard library and any packages installed with the interpreter.

        If `auto_data` is true, then any existing data file will be read when
        coverage measurement starts, and data will be saved automatically when
        measurement stops.

        If `timid` is true, then a slower and simpler trace function will be
        used.  This is important for some environments where manipulation of
        tracing functions breaks the faster trace function.

        If `branch` is true, then branch coverage will be measured in addition
        to the usual statement coverage.

        `config_file` determines what configuration file to read:

            * If it is ".coveragerc", it is interpreted as if it were True,
              for backward compatibility.

            * If it is a string, it is the name of the file to read.  If the
              file can't be read, it is an error.

            * If it is True, then a few standard files names are tried
              (".coveragerc", "setup.cfg", "tox.ini").  It is not an error for
              these files to not be found.

            * If it is False, then no configuration file is read.

        `source` is a list of file paths or package names.  Only code located
        in the trees indicated by the file paths or package names will be
        measured.

        `source_pkgs` is a list of package names. It works the same as
        `source`, but can be used to name packages where the name can also be
        interpreted as a file path.

        `include` and `omit` are lists of file name patterns. Files that match
        `include` will be measured, files that match `omit` will not.  Each
        will also accept a single string argument.

        `debug` is a list of strings indicating what debugging information is
        desired.

        `concurrency` is a string indicating the concurrency library being used
        in the measured code.  Without this, coverage.py will get incorrect
        results if these libraries are in use.  Valid strings are "greenlet",
        "eventlet", "gevent", "multiprocessing", or "thread" (the default).
        This can also be a list of these strings.

        If `check_preimported` is true, then when coverage is started, the
        already-imported files will be checked to see if they should be
        measured by coverage.  Importing measured files before coverage is
        started can mean that code is missed.

        `context` is a string to use as the :ref:`static context
        <static_contexts>` label for collected data.

        .. versionadded:: 4.0
            The `concurrency` parameter.

        .. versionadded:: 4.2
            The `concurrency` parameter can now be a list of strings.

        .. versionadded:: 5.0
            The `check_preimported` and `context` parameters.

        .. versionadded:: 5.3
            The `source_pkgs` parameter.

        N)Úconfig_fileÚ	data_fileÚcover_pylibÚtimidÚbranchÚparallelÚsourceÚsource_pkgsZrun_omitZrun_includeÚdebugÚreport_omitÚreport_includeÚconcurrencyÚcontextTF)Ú_no_diskÚ_DEFAULT_DATAFILErrr'Ú_debug_fileÚ
_auto_loadÚ
_auto_saveÚ_data_suffix_specifiedÚ
_warn_no_dataÚ_warn_unimported_sourceÚ_warn_preimported_sourceÚ_no_warn_slugsÚ	_warningsÚ_dataÚ
_collectorÚ_pluginsÚ_inoroutZ_data_suffixZ_run_suffixÚ_exclude_reÚ_debugÚ_file_mapperÚ_initedÚ_inited_for_startÚ_startedÚ_should_write_debugrZMETACOVÚ _prevent_sub_process_measurement)Úselfr5Zdata_suffixr6Z	auto_datar7r8r4r:r;ÚomitÚincluder<r?Zcheck_preimportedr@r+r+r,Ú__init__ds>Z

zCoverage.__init__cCs¦|jr
dSd|_t|jj|jƒ|_d|jjp.dkr:d|j_i|_t	ƒ|jj
rRtnt|_
t |jj|j|j¡|_x0|jjD]$}| ||jgtt ¡ƒd¡qzWdS)zßSet all the initial state.

        This is called by the public methods to initialize state. This lets us
        construct a :class:`Coverage` object, then tweak its state before this
        function is called.

        NTÚmultiprocessingr+é)rSr
r'r<rCrQr?r9rPrZrelative_filesrrrRrZload_pluginsÚpluginsrNÚconfigurersÚ	configureÚintÚtime)rXÚpluginr+r+r,Ú_initõszCoverage._initcCsD|jrd|_| ¡|jjr@|jjtddkr@td |jj¡ƒ‚dS)z,Stuff to do after everything is initialized.Fé)ÚlimitzCrashing because called by {}N)rVÚ_write_startup_debugr'Z_crashrÚ	ExceptionÚformat)rXr+r+r,Ú
_post_inits
zCoverage._post_initc	Cs¾d}|j ¡”|j d¡rLt|jj ¡ƒ}dd„|Dƒ}t|jd|ƒd}|j d¡ržt|jd| ¡ƒx.|j	D]$}d|j
}| ¡}t|j||ƒqrWd}WdQRX|rºt|jd	d
ƒdS)z*Write out debug info at startup if needed.Fr'cSs"g|]\}}| d¡s||f‘qS)Ú_)Ú
startswith)Ú.0ÚkÚvr+r+r,ú
<listcomp>.sz1Coverage._write_startup_debug.<locals>.<listcomp>TÚsyszsys: NÚendr+)rQZwithout_callersÚshouldÚsortedr'Ú__dict__ÚitemsrÚsys_inforNÚ_coverage_plugin_name)rXZ	wrote_anyZconfig_inforcÚheaderÚinfor+r+r,rg(s 
zCoverage._write_startup_debugcCs.|j ||¡}|j d¡r*|j t|ƒ¡|S)z„Decide whether to trace execution in `filename`.

        Calls `_should_trace_internal`, and returns the FileDisposition.

        Útrace)rOÚshould_tracerQrsÚwriter)rXÚfilenameÚframeZdispr+r+r,Ú
_should_trace=szCoverage._should_tracecCsH|j ||¡}|j d¡rB|s*d|f}nd||f}|j |¡|S)z˜Check a file name against the include/omit/etc, rules, verbosely.

        Returns a boolean: True if the file should be traced, False if not.

        r{zIncluding %rzNot including %r: %s)rOZcheck_include_omit_etcrQrsr})rXr~rÚreasonÚmsgr+r+r,Ú_check_include_omit_etcHsz Coverage._check_include_omit_etccCs‚|jdkrt|jjƒ|_||jkr&dS|j |¡|rBd||f}|j d¡r^dt 	¡|f}t
j d|¡|r~|j |¡dS)zºUse `msg` as a warning.

        For warning suppression, use `slug` as the shorthand.

        If `once` is true, only show this warning once (determined by the
        slug.)

        Nz%s (%s)Úpidz[%d] %szCoverage.py warning: %s
)
rJÚlistr'Údisable_warningsrKÚappendrQrsÚosÚgetpidrqÚstderrr})rXr‚ÚslugÚoncer+r+r,Ú_warnXs	

zCoverage._warncCs|j |¡S)aGet an option from the configuration.

        `option_name` is a colon-separated string indicating the section and
        option name.  For example, the ``branch`` option in the ``[run]``
        section of the config file would be indicated with `"run:branch"`.

        Returns the value of the option.  The type depends on the option
        selected.

        As a special case, an `option_name` of ``"paths"`` will return an
        OrderedDict with the entire ``[paths]`` section value.

        .. versionadded:: 4.0

        )r'Ú
get_option)rXÚoption_namer+r+r,rŽrszCoverage.get_optioncCs|j ||¡dS)a/Set an option in the configuration.

        `option_name` is a colon-separated string indicating the section and
        option name.  For example, the ``branch`` option in the ``[run]``
        section of the config file would be indicated with ``"run:branch"``.

        `value` is the new value for the option.  This should be an
        appropriate Python value.  For example, use True for booleans, not the
        string ``"True"``.

        As an example, calling::

            cov.set_option("run:branch", True)

        has the same effect as this configuration file::

            [run]
            branch = True

        As a special case, an `option_name` of ``"paths"`` will replace the
        entire ``[paths]`` section.  The value should be an OrderedDict.

        .. versionadded:: 4.0

        N)r'Ú
set_option)rXrÚvaluer+r+r,r„szCoverage.set_optioncCs\| ¡|jr|j ¡|jjo0tj |jj¡}|sB|j	dd| 
¡|sX|j ¡dS)z;Load previously-collected coverage data from the data file.N)Úsuffix)
rdrMÚresetr'r9rˆÚpathÚexistsr5Ú
_init_datarjrLÚread)rXÚshould_skipr+r+r,Úload s
z
Coverage.loadc
Cs¬|jjp
d}d|kr.ts tdƒ‚t|jjd|jj}|rB|dkrHg}n|dkrXtg}ntd |¡ƒ‚| dd	„|j	j
Dƒ¡t|ƒ}t|j
|j||j|jj|jj|j|d
|_|j}|sÂ|jjrÒt|tƒsÖd}nd}| |¡|j |j|jj¡|j	jrN|jjsN| d
d dd	„|j	jDƒ¡|j ¡f¡x|j	jD]}d|_ q>Wt!|j|j" #d¡rh|j"ndd|_$|j$ %|j¡|j	|j$_&|jj'|j$_(d|_)t* +|j,¡dS)zInitialization for start()r+r\z/multiprocessing is not supported on this Python)ZrcfileÚnoneZ
test_functionz.Don't understand dynamic_context setting: {!r}css|]}|jVqdS)N)Údynamic_context)rmrcr+r+r,ú	<genexpr>Âsz+Coverage._init_for_start.<locals>.<genexpr>)r|Z
check_includeÚshould_start_contextZfile_mapperr7r8Úwarnr?TNz1Plugin file tracers (%s) aren't supported with %sz, css|]}|jVqdS)N)rx)rmrcr+r+r,rœãsFr{)ržr<)-r'r?r&rr4r›r	riÚextendrNÚcontext_switchersr
rr€rƒrRr7r8rrMrFr9Ú
isinstancerr–Zuse_datarLr@Úfile_tracersZsupports_pluginsÚjoinÚtracer_nameÚ_coverage_enabledrrQrsrOr`r^Zfile_disposition_classZ
disp_classrVÚatexitÚregisterÚ_atexit)rXr?Zdyconr rr’rcr+r+r,Ú_init_for_start¬sb



zCoverage._init_for_startcCs8|jdkr4t|jjƒt|jj||j|j|jd|_dS)z,Create a data file if we don't have one yet.N)Úbasenamer’ržr<Zno_disk)rLrr'r5rrrQrA)rXr’r+r+r,r–ús
zCoverage._init_datacCsl| ¡|jsd|_| ¡| ¡|j ¡|jr>|j ¡|jrL| 	¡|j
 ¡d|_|j
 |¡dS)aaStart measuring code coverage.

        Coverage measurement only occurs in functions called after
        :meth:`start` is invoked.  Statements in the same scope as
        :meth:`start` won't be measured.

        Once you invoke :meth:`start`, you must also call :meth:`stop`
        eventually, or your process might not shut down cleanly.

        TN)rdrTr©rjrOZwarn_conflicting_settingsrIZwarn_already_imported_filesrDr™rMÚstartrUr1r‡)rXr+r+r,r«	s


zCoverage.startcCs8|jr|jd|kr|j ¡|jr.|j ¡d|_dS)zStop measuring code coverage.r0FN)r1ÚpoprUrMÚstop)rXr+r+r,r­)s

z
Coverage.stopcCsD|j d¡r$|j d t ¡|¡¡|jr2| ¡|jr@| 	¡dS)zClean up on process shutdown.Úprocesszatexit: pid: {}, instance: {!r}N)
rQrsr}rirˆr‰rUr­rEÚsave)rXr+r+r,r¨2szCoverage._atexitcCsN| ¡| ¡|jr |j ¡|jdd|jj|jjdd|_d|_	dS)z£Erase previously collected coverage data.

        This removes the in-memory data collected in this session as well as
        discarding the data file.

        N)r’)r9F)
rdrjrMr“r–rLÚeraser'r9rT)rXr+r+r,r°;s
zCoverage.erasecCs6|jstdƒ‚|jjr&|jdddd|j |¡dS)ašSwitch to a new dynamic context.

        `new_context` is a string to use as the :ref:`dynamic context
        <dynamic_contexts>` label for collected data.  If a :ref:`static
        context <static_contexts>` is in use, the static and dynamic context
        labels will be joined together with a pipe character.

        Coverage collection must be started already.

        .. versionadded:: 5.0

        z.Cannot switch context, coverage is not startedzConflicting dynamic contextszdynamic-conflictT)r‹rŒN)rUrrMrrÚswitch_context)rXZnew_contextr+r+r,r±Ks
zCoverage.switch_contextÚexcludecCs&| ¡t|j|dgƒ| ¡dS)zClear the exclude list.Ú_listN)rdÚsetattrr'Ú_exclude_regex_stale)rXÚwhichr+r+r,Ú
clear_excludebszCoverage.clear_excludecCs.| ¡t|j|dƒ}| |¡| ¡dS)a|Exclude source lines from execution consideration.

        A number of lists of regular expressions are maintained.  Each list
        selects lines that are treated differently during reporting.

        `which` determines which list is modified.  The "exclude" list selects
        lines that are not considered executable at all.  The "partial" list
        indicates lines with branches that are not taken.

        `regex` is a regular expression.  The regex is added to the specified
        list.  If any of the regexes in the list is found in a line, the line
        is marked for special treatment during reporting.

        r³N)rdÚgetattrr'r‡rµ)rXÚregexr¶Ú	excl_listr+r+r,r²hs
zCoverage.excludecCs|j ¡dS)z=Drop all the compiled exclusion regexes, a list was modified.N)rPÚclear)rXr+r+r,rµ|szCoverage._exclude_regex_stalecCs2||jkr(t|j|dƒ}t|ƒ|j|<|j|S)z5Return a compiled regex for the given exclusion list.r³)rPr¸r'r)rXr¶rºr+r+r,Ú_exclude_regex€s
zCoverage._exclude_regexcCs| ¡t|j|dƒS)z·Return a list of excluded regex patterns.

        `which` indicates which list is desired.  See :meth:`exclude` for the
        lists that are available, and their meaning.

        r³)rdr¸r')rXr¶r+r+r,Úget_exclude_list‡szCoverage.get_exclude_listcCs| ¡}| ¡dS)z2Save the collected coverage data to the data file.N)Úget_datar})rXÚdatar+r+r,r¯‘sz
Coverage.savecCsŽ| ¡|jdd| ¡| ¡d}|jjrvtƒ}x>|jj ¡D].}|d}x |dd…D]}| ||¡q^WqDWt	|j
||||ddS)ašCombine together a number of similarly-named coverage data files.

        All coverage data files whose name starts with `data_file` (from the
        coverage() constructor) will be read, and combined together into the
        current measurements.

        `data_paths` is a list of files or directories from which data should
        be combined. If no list is passed, then the data files from the
        directory indicated by the current data file (probably the current
        directory) will be combined.

        If `strict` is true, then it is an error to attempt to combine when
        there are no data files to combine.

        If `keep` is true, then original input data files won't be deleted.

        .. versionadded:: 4.0
            The `data_paths` parameter.

        .. versionadded:: 4.3
            The `strict` parameter.

        .. versionadded: 5.5
            The `keep` parameter.
        N)r’ré)ÚaliasesÚ
data_pathsÚstrictÚkeep)rdr–rjr¾r'ÚpathsrÚvaluesÚaddrrL)rXrÂrÃrÄrÁrÅÚresultÚpatternr+r+r,Úcombine–s"zCoverage.combinecCs\| ¡|jdd| ¡x |jD]}|js$|j |¡q$W|jrV|j ¡rV| ¡|j	S)zËGet the collected data.

        Also warn about various problems collecting data.

        Returns a :class:`coverage.CoverageData`, the collected coverage data.

        .. versionadded:: 4.0

        N)r’)
rdr–rjrNr¥rMZplugin_was_disabledZ
flush_dataÚ_post_save_workrL)rXrcr+r+r,r¾Ås
zCoverage.get_datacCs¨|jr|j ¡|js*|jr*|jddd|jdk	r’t t¡}x.|j 	¡D] \}}| 
|¡}|| |¡qJWx"| ¡D]\}}|j 
||¡qxW|jjr¤| d¡dS)z£After saving data, look for warnings, post-work, etc.

        Warn about things that should have happened but didn't.
        Look for unexecuted files.

        zNo data was collected.zno-data-collected)r‹Nz0The '[run] note' setting is no longer supported.)rHrOZwarn_unimported_sourcerLrGrÚcollectionsÚdefaultdictr…Zfind_possibly_unexecuted_filesrRr‡rvZtouch_filesr'Znote)rXÚ
file_pathsÚ	file_pathÚplugin_namerÅr+r+r,rËÜs	



zCoverage._post_save_workcCs | |¡\}}}}}||||fS)z:Like `analysis2` but doesn't return excluded line numbers.)Ú	analysis2)rXÚmorfÚfÚsrkÚmZmfr+r+r,ÚanalysisúszCoverage.analysiscCs0| |¡}|jt|jƒt|jƒt|jƒ| ¡fS)aGAnalyze a module.

        `morf` is a module or a file name.  It will be analyzed to determine
        its coverage statistics.  The return value is a 5-tuple:

        * The file name for the module.
        * A list of line numbers of executable statements.
        * A list of line numbers of excluded statements.
        * A list of line numbers of statements not run (missing from
          execution).
        * A readable formatted string of the missing line numbers.

        The analysis uses the source file itself and the current measured
        coverage data.

        )Ú_analyzer~rtZ
statementsZexcludedÚmissingZmissing_formatted)rXrÒrÖr+r+r,rÑÿs
zCoverage.analysis2cCsH| ¡t |jj¡| ¡| ¡}t|tƒs:| 	|¡}t
|||jƒS)zTAnalyze a single morf or code unit.

        Returns an `Analysis` object.

        )rdr#Z
set_precisionr'Ú	precisionrjr¾r¡rÚ_get_file_reporterr"rR)rXÚitr¿r+r+r,r×s

zCoverage._analyzecCsvd}d}t|tƒr`| |¡}|j |¡}|r`|j |¡}|r`| |¡}|dkr`td|j	|fƒ‚|dkrrt
||ƒ}|S)z-Get a FileReporter for a module or file name.NÚpythonz1Plugin %r did not provide a file reporter for %r.)r¡rrRrLZfile_tracerrNÚgetÚ
file_reporterrrxr )rXrÒrcrÞZmapped_morfrÐr+r+r,rÚ*s 



zCoverage._get_file_reportercs:|sˆj ¡}t|tttfƒs$|g}‡fdd„|Dƒ}|S)aGet a list of FileReporters for a list of modules or file names.

        For each module or file name in `morfs`, find a FileReporter.  Return
        the list of FileReporters.

        If `morfs` is a single module or file name, this returns a list of one
        FileReporter.  If `morfs` is empty or None, then the list of all files
        measured is used to find the FileReporters.

        csg|]}ˆ |¡‘qSr+)rÚ)rmrÒ)rXr+r,rpUsz0Coverage._get_file_reporters.<locals>.<listcomp>)rLZmeasured_filesr¡r…ÚtupleÚset)rXÚmorfsZfile_reportersr+)rXr,Ú_get_file_reportersCs
zCoverage._get_file_reportersc
Cs>t||||||||	|
|d
t|ƒ}|j||dSQRXdS)aTWrite a textual summary report to `file`.

        Each module in `morfs` is listed, with counts of statements, executed
        statements, missing statements, and a list of lines missed.

        If `show_missing` is true, then details of which lines or branches are
        missing will be included in the report.  If `ignore_errors` is true,
        then a failure while reporting a single file will not stop the entire
        report.

        `file` is a file-like object, suitable for writing.

        `include` is a list of file name patterns.  Files that match will be
        included in the report. Files matching `omit` will not be included in
        the report.

        If `skip_covered` is true, don't report on files with 100% coverage.

        If `skip_empty` is true, don't report on empty files (those that have
        no statements).

        `contexts` is a list of regular expressions.  Only data from
        :ref:`dynamic contexts <dynamic_contexts>` that match one of those
        expressions (using :func:`re.search <python:re.search>`) will be
        included in the report.

        `precision` is the number of digits to display after the decimal
        point for percentages.

        All of the arguments default to the settings read from the
        :ref:`configuration file <config>`.

        Returns a float, the total percentage covered.

        .. versionadded:: 4.0
            The `skip_covered` parameter.

        .. versionadded:: 5.0
            The `contexts` and `skip_empty` parameters.

        .. versionadded:: 5.2
            The `precision` parameter.

        )	Ú
ignore_errorsr=r>Úshow_missingÚskip_coveredÚreport_contextsÚ
skip_emptyrÙÚsort)ÚoutfileN)r-r$Úreport)
rXrárärãÚfilerYrZråÚcontextsrçrÙrèÚreporterr+r+r,rêXs1
zCoverage.reportc	Cs8t|||||dt|ƒ}|j||dWdQRXdS)azAnnotate a list of modules.

        Each module in `morfs` is annotated.  The source is written to a new
        file, named with a ",cover" suffix, with each line prefixed with a
        marker to indicate the coverage of the line.  Covered lines have ">",
        excluded lines have "-", and missing lines have "!".

        See :meth:`report` for other arguments.

        )rãr=r>ræ)Ú	directoryN)r-rrê)rXrárîrãrYrZrìrír+r+r,Úannotate“s
zCoverage.annotatec
Cs>t|||||||||	|
||dt|ƒ}
|
 |¡SQRXdS)aDGenerate an HTML report.

        The HTML is written to `directory`.  The file "index.html" is the
        overview starting point, with links to more detailed pages for
        individual modules.

        `extra_css` is a path to a file of other CSS to apply on the page.
        It will be copied into the HTML directory.

        `title` is a text string (not HTML) to use as the title of the HTML
        report.

        See :meth:`report` for other arguments.

        Returns a float, the total percentage covered.

        .. note::
            The HTML report files are generated incrementally based on the
            source files and coverage results. If you modify the report files,
            the changes will not be considered.  You should be careful about
            changing the files in the report folder.

        )rãr=r>Zhtml_dirÚ	extra_cssZ
html_titleZhtml_skip_coveredÚ
show_contextsræZhtml_skip_emptyrÙN)r-rrê)rXrárîrãrYrZrðÚtitlerårñrìrçrÙrír+r+r,Úhtml_report¨szCoverage.html_reportc	Cs6t|||||||dt|jjt|ƒ|ƒSQRXdS)abGenerate an XML report of coverage results.

        The report is compatible with Cobertura reports.

        Each module in `morfs` is included in the report.  `outfile` is the
        path to write the file to, "-" will write to stdout.

        See :meth:`report` for other arguments.

        Returns a float, the total percentage covered.

        )rãr=r>Ú
xml_outputrærçN)r-r!r'rôr%)rXrárérãrYrZrìrçr+r+r,Ú
xml_reportÎszCoverage.xml_reportc		
Cs8t||||||||dt|jjt|ƒ|ƒSQRXdS)aGGenerate a JSON report of coverage results.

        Each module in `morfs` is included in the report.  `outfile` is the
        path to write the file to, "-" will write to stdout.

        See :meth:`report` for other arguments.

        Returns a float, the total percentage covered.

        .. versionadded:: 5.0

        )rãr=r>Újson_outputræZjson_pretty_printZjson_show_contextsN)r-r!r'rör)	rXrárérãrYrZrìZpretty_printrñr+r+r,Újson_reportäs

zCoverage.json_reportcCsŠddl}| ¡| ¡dd„}d|jfd|jfd|jrB|j ¡ndfd	trPd
ndfd||jj	ƒfd
||jj
ƒfd||jjƒfd|jj
fd|jjfd|jjfd|jjr²t|jjƒndfd|jdk	rÌ|j ¡ndfdtj dd¡fdt ¡fdt ¡fdtjfdt ¡fdt ¡fdt ¡fdt ¡fdtjfdt d d!„t!tj"ƒDƒƒfd"d# #t$td$dgƒ¡fg}|j%rx| &|j% '¡¡| &t( '¡¡|S)%zAReturn a list of (key, value) pairs showing internal information.rNcSs4g}x*|D]"}|j}|js"|d7}| |¡q
W|S)z7Make an entry for the sys_info from a list of plug-ins.z (disabled))rxr¥r‡)r^ÚentriesrcÚentryr+r+r,Úplugin_infos
z&Coverage.sys_info.<locals>.plugin_infoÚversionÚcoverageZtracerz-none-rÚ	availableÚunavailablezplugins.file_tracerszplugins.configurerszplugins.context_switchersZconfigs_attemptedZconfigs_readr4Zconfig_contentsr5rÜÚ
ÚÚplatformÚimplementationÚ
executableZdef_encodingZfs_encodingr„Úcwdr”Úenvironmentc3s4|],\‰}t‡fdd„dDƒƒrdˆ|fVqdS)c3s|]}|ˆkVqdS)Nr+)rmr‹)rnr+r,rœ+sz.Coverage.sys_info.<locals>.<genexpr>.<genexpr>)ZCOVZPYz%s = %sN)Úany)rmror+)rnr,rœ)sz$Coverage.sys_info.<locals>.<genexpr>Zcommand_lineú Úargv))rürdrjÚ__version__Ú__file__rMr¤rrNr¢r_r r'Zattempted_config_filesZconfig_files_readr4Z_config_contentsÚreprrLZ
data_filenamerqrûÚreplacerÚpython_implementationrÚgetdefaultencodingÚgetfilesystemencodingrˆr‰Úgetcwdr”rtrÚenvironr£r¸rOrŸrwr)rXZcovmodrúrzr+r+r,rwüsF








zCoverage.sys_info)NF)r²)r²)r²)NFF)N)NNNNNNNNNNN)NNNNNN)NNNNNNNNNNNN)NNNNNNN)NNNNNNNN)-Ú__name__Ú
__module__Ú__qualname__Ú__doc__r1Úclassmethodr3rBr[rdrjrgr€rƒrrŽrr™r©r–r«r­r¨r°r±r·r²rµr¼r½r¯rÊr¾rËrÖrÑr×rÚrârêrïrórõr÷rwr+r+r+r,r/@sj
(
N 		




/

9

#

r/ZCOVERAGE_DEBUG_CALLS)Údecorate_methodsÚ
show_callsT)Z	show_argsr¾)ZbutnotcCsVtj d¡}|sdSttdƒr"dSt|d}|t_d|_d|_d|_	d|_
| ¡|S)aµCall this at Python start-up to perhaps measure coverage.

    If the environment variable COVERAGE_PROCESS_START is defined, coverage
    measurement is started.  The value of the variable is the config file
    to use.

    There are two ways to configure your Python installation to invoke this
    function when Python starts:

    #. Create or append to sitecustomize.py to add these lines::

        import coverage
        coverage.process_startup()

    #. Create a .pth file in your Python installation containing::

        import coverage; coverage.process_startup()

    Returns the :class:`Coverage` instance that was started, or None if it was
    not started by this call.

    ZCOVERAGE_PROCESS_STARTNrü)r4FT)rˆrrÝÚhasattrÚprocess_startupr/rürGrHrIrEr«)Zcpsr)r+r+r,r@s

rcCsttddƒ}|dk	rd|_dS)z7Stop any subprocess auto-measurement from writing data.rüNF)r¸rrE)Zauto_created_coverager+r+r,rWusrW)Qrr¦rÌÚ
contextlibrˆÚos.pathrrqrbrürZcoverage.annotaterZcoverage.backwardrrZcoverage.collectorrrZcoverage.configrZcoverage.contextr	r
Z
coverage.datarrZcoverage.debugr
rrZcoverage.dispositionrZcoverage.filesrrrrZ
coverage.htmlrZcoverage.inoroutrZcoverage.jsonreportrZ
coverage.miscrrrrrrZcoverage.pluginrZcoverage.plugin_supportrZcoverage.pythonr Zcoverage.reportr!Zcoverage.resultsr"r#Zcoverage.summaryr$Zcoverage.xmlreportr%Zcoverage.multiprocr&ÚImportErrorÚcontextmanagerr-rBÚobjectr/rarrÝrrrrWr+r+r+r,Ú<module>sf
5