Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/coverage/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/coverage/__pycache__/control.cpython-37.pyc

B

���W��@s�dZddlZddlZddlZddlZddlZddlZddlZddlm	Z	m
Z
ddlmZddl
mZmZddlmZddlmZddlmZmZdd	lmZdd
lmZmZddlmZmZmZddlmZm Z dd
l!m"Z"ddl#m$Z$m%Z%m&Z&ddl#m'Z'm(Z(ddl)m*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0ddl1m2Z2m3Z3ddl4m5Z5ddl6m7Z7e(e�Zyddl8Z8Wne9k
�r�dZ8YnXGdd�de:�Z;dd�Z<dd�Z=dd�Z>dd �Z?dS)!z#Core control stuff for coverage.py.�N)�env�files)�AnnotateReporter)�string_class�iitems)�	Collector)�CoverageConfig)�CoverageData�CoverageDataFiles)�DebugControl)�TreeMatcher�FnmatchMatcher)�PathAliases�find_python_files�
prep_patterns)�
ModuleMatcher�abs_file)�HtmlReporter)�CoverageException�bool_or_none�
join_regex)�file_be_gone�isolate_module)�patch_multiprocessing)�FileReporter)�Plugins)�PythonFileReporter)�Analysis�Numbers)�SummaryReporter)�XmlReporterc@sDeZdZdZdNdd�Zdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�ZdOd*d+�ZdPd,d-�Zd.d/�Zd0d1�ZdQd2d3�Zd4d5�ZdRd6d7�Zd8d9�Zd:d;�Zd<d=�Zd>d?�Z d@dA�Z!dSdBdC�Z"dTdDdE�Z#dUdFdG�Z$dVdHdI�Z%dWdJdK�Z&dLdM�Z'dS)X�Coveragez�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')

    NFTc
Cs�t�|_|rbd}
|dkrd}|dk	}|s,d}||_|j�|�}
|
sb|rRtd|��|jjddd�tj�d�}|rz||j_tj�d	�}|r�|jj	�
|�d
��|jj||||t
|�||	|
||d�
d|_||_||_d|_d|_d|_|_d|_|_d|_d|_g|_d|_|_|_d|_d|_|_|_ d|_!d|_"|_#d|_$|_%d|_&d|_	d|_'d|_(d|_)t*j+�s~t,�dS)
aL

        `data_file` is the base name of the data file to use, defaulting to
        ".coverage".  `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").  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.

        `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.

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

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

        Fz.coveragercTz#Couldn't read '%s' as a config filez	setup.cfgz	coverage:)�section_prefixZ
COVERAGE_FILEZCOVERAGE_DEBUG�,)
�	data_file�cover_pylib�timid�branch�parallel�source�omit�include�debug�concurrencyN)-r�config�config_file�	from_filer�os�environ�getr$r,�extend�split�	from_argsr�_debug_file�
_auto_data�_data_suffix�source_match�source_pkgs_match�pylib_match�cover_match�
include_match�
omit_match�
_warn_no_data�_warn_unimported_source�	_warningsr*r+r)�source_pkgs�data�
data_files�	collector�plugins�
pylib_dirs�
cover_dirs�data_suffix�
run_suffix�_exclude_re�_inited�_started�	_measuredrZMETACOV� _prevent_sub_process_measurement)�selfr$rJr%�	auto_datar&r'r/r)r*r+r,r-Zdid_read_rcZspecified_fileZ
env_data_fileZdebugs�rS�C/opt/alt/python37/lib64/python3.7/site-packages/coverage/control.py�__init__;sbC
zCoverage.__init__cCs |jr
dS|jdkr:tj�d�}|r2t|d�|_ntj|_t|j	j
|j�|_
t�|j	j
|j	|j
�|_
i|_|��t��g|_g|_x@|j	jp�gD]0}tj�|�r�|j�t�|��q�|j�|�q�Wt|j	j�|_t|j	j�|_|j	jp�g}d|k�rt|jd�d|j	_t|j |j!|j	j"|j	j#|j$|d�|_%|j
j&�r�|j%j'�s�|�$dd	�(d
d�|j
j&D��|j%�)�f�x|j
j&D]}d|_*�q|W|j+�s�|j	j�r�t,|j+t-��s�d|_+nd|_+d|_.|j+|_/t0|j
d
�|_1t2|j	j3|j$d�|_4t5�|_6|j	j7�s�xDt8t9tt:t;t<t=fD].}|dk	�rt>|d��r|j6�?|�@|���qWt<�r�t>t<d��s�t<jA}y|jBjC}WntDk
�r�|jEjC}YnX|j6�?|�@|��|�@tF�g|_GtHjI�r�ddlJ}ddlK}	x$||	gD]}
|jG�|�@|
���q�WtL�M|j	jN�t8�O|jP�d|_|j�s|j�r.tQ|j�|_RtS|j�|_Tn(|jG�rBtQ|jG�|_U|j6�rVtQ|j6�|_V|j�rjtW|j�|_X|j�r~tW|j�|_Yd}|j
�Zd��r�t[|j	j\�]��}|j
�^d|�d}|j
�Zd��r|j
�^d|�_��x0|j
D]&}d|j`}
|�_�}|j
�^|
|��q�Wd}|�r|j
�^dd�dS)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.

        NZCOVERAGE_DEBUG_FILE�a�multiprocessing)ZrcfileT)Zshould_traceZ
check_includer&r'�warnr-z1Plugin file tracers (%s) aren't supported with %sz, css|]}|jVqdS)N)�_coverage_plugin_name)�.0�pluginrSrSrT�	<genexpr>sz!Coverage._init.<locals>.<genexpr>F)r,)�basenamerX�__file__rr.�syszsys: �endrS)arMr7r1r2r3�openr_�stderrrr.r,rZload_pluginsrGrL�_exclude_regex_stalerZset_relative_directoryr)rC�path�exists�append�canonical_filenamerr*r+r-rr/r(r�
_should_trace�_check_include_omit_etcr&r'�_warnrF�file_tracersZsupports_plugins�join�tracer_name�_coverage_enabledr9�
isinstancerrJrKr	rDr
r$rE�setrHr%�atexit�inspect�platform�re�
_structseq�	traceback�hasattr�add�_canonical_dir�
structseq_new�	func_code�co_filename�AttributeError�__code__r^rIrZTESTING�	contracts�sixrZ
set_precisionZ	precision�register�_atexitrr:rr;r=r<r
r>r?�should�sorted�__dict__�itemsZwrite_formatted_info�sys_inforY)rQZdebug_file_name�srcr-r[�mrzZstructseq_filerr��modZ	wrote_anyZconfig_info�header�inforSrSrT�_init�s�




zCoverage._initcCst||�j}tj�|�dS)z<Return the canonical directory of the module or file `morf`.r)r�filenamer1rdr5)rQ�morfZ
morf_filenamerSrSrTryxszCoverage._canonical_dircCst|�d�r|S|�d�rV|dd�}tj�|�r4|StjrR|d}tj�|�rR|S|S|�d�rp|dd�dS|S)z�Return the source file for `filename`.

        Given a file name being traced, return the best guess as to the source
        file to attribute it to.

        z.py)z.pycz.pyoN����wz	$py.classi����)�endswithr1rdrerZWINDOWS)rQr�Zpy_filenameZpyw_filenamerSrSrT�_source_for_file}s


zCoverage._source_for_filecCs�|�dd�}t|t�r"|dkr"|S|�dd�}x:dD]2}t||�r4t||�}nq4t|t�r4|dkr4|Sq4Wt�|�}|dk	r�|S|SdS)a�Get the name of the module for a set of globals and file name.

        For configurability's sake, we allow __main__ modules to be matched by
        their importable name.

        If loaded via runpy (aka -m), we can usually recover the "original"
        full dotted module name, otherwise, we resort to interpreting the
        file name to get the module's name.  In the case that the module name
        can't be determined, None is returned.

        �__name__N�__main__�
__loader__)�fullname�name)r3ro�strrw�getattrrr�
getmodulename)rQ�module_globalsr�Zdunder_name�loader�attrnamer�Z
inspectednamerSrSrT�_name_for_module�s


zCoverage._name_for_modulec	Cs�|}t|jj|�}dd�}|j�d�}|rb|�|�}|rb|�d�sbtj�	|�}|tj�	|�krb|}|sp||d�S|�d�r�||d�S|�d�r�||d�St
�d	|�r�||d
�S|�d�r�|dd
�d}t
�|�}||_d}	x�|jjD]�}	|	js�q�yN|	�|�}
|
dk	�r>|	|
_d|_|
|_|
���r,d|_nt
�|
���|_PWq�tk
�rv|�d|	j�t��d|	_w�Yq�Xq�Wd|_||_|j�s�|j�s�td|	|jf��|�|j|�}|�r�|||�|S)aDecide whether to trace execution in `filename`, with a reason.

        This function is called from the trace function.  As each new file name
        is encountered, this function determines whether it is traced or not.

        Returns a FileDisposition object.

        cSsd|_||_|S)z+Simple helper to make it easy to return NO.F)�trace�reason)�dispr�rSrSrT�nope�sz-Coverage._should_trace_internal.<locals>.noper^�<zempty string isn't a file namezmemory:zmemory isn't traceableznot a real file namez[/\\]Modules[/\\]pyexpat.czpyexpat lies about itselfz	$py.classNi����z.pyTz(Disabling plugin %r due to an exception:Fz+Plugin %r didn't set source_filename for %r) �_disposition_initrFZfile_disposition_class�	f_globalsr3r��
startswithr1rdr]rt�searchr�rrgrGrkrn�file_tracerZ_coverage_pluginr�Zhas_dynamic_source_filename�has_dynamic_filename�source_filename�	ExceptionrjrYrv�	print_excr�original_filename� _check_include_omit_etc_internal)rQr��framer�r�r�Zdunder_file�orig�	canonicalr[r�r�rSrSrT�_should_trace_internal�sp	














zCoverage._should_trace_internalcCs�|�|j|�}|jrL|j�|�r:||jkr6|j�|�dS|j�|�s�dSnD|jrd|j�|�s�dSn,|jrz|j�|�rzdS|j	r�|j	�|�r�dS|j
r�|j
�|�r�dSdS)z�Check a file name against the include, omit, etc, rules.

        Returns a string or None.  String means, don't trace, and is the reason
        why.  None means no reason found to not trace.

        Nz falls outside the --source treesz!falls outside the --include treeszis in the stdlibzis part of coverage.pyzis inside an --omit pattern)r�r�r:r;�matchrC�remover>r<r=r?)rQr�r�Z
modulenamerSrSrTr�-s$
z)Coverage._check_include_omit_etc_internalcCs,|�||�}|j�d�r(|j�t|��|S)z�Decide whether to trace execution in `filename`.

        Calls `_should_trace_internal`, and returns the FileDisposition.

        r�)r�r,r��write�_disposition_debug_msg)rQr�r�r�rSrSrTrhWszCoverage._should_tracecCsF|�||�}|j�d�r@|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)r�r,r�r�)rQr�r�r��msgrSrSrTribsz Coverage._check_include_omit_etccCs<|j�|�|j�d�r(dt��|f}tj�d|�dS)zUse `msg` as a warning.�pidz[%d] %szCoverage.py warning: %s
N)	rBrfr,r�r1�getpidr_rbr�)rQr�rSrSrTrjrszCoverage._warncCs|j�|�S)a[Get 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.

        .. versionadded:: 4.0

        )r.�
get_option)rQ�option_namerSrSrTr�yszCoverage.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 a Python
        value where appropriate.  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

        .. versionadded:: 4.0

        N)r.�
set_option)rQr��valuerSrSrTr��szCoverage.set_optioncCs|��|s|�d�dS)zObsolete method.z(use_cache(False) is no longer supported.N)r�rj)rQZusecacherSrSrT�	use_cache�szCoverage.use_cachecCs$|��|j��|j�|j�dS)z;Load previously-collected coverage data from the data file.N)r�rF�resetrE�readrD)rQrSrSrT�load�s
z
Coverage.loadcCs>|��|jr|j|_|jr$|��|j��d|_d|_dS)aeStart measuring code coverage.

        Coverage measurement actually 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)	r�rKrJr8r�rF�startrNrO)rQrSrSrTr��s
zCoverage.startcCs|jr|j��d|_dS)zStop measuring code coverage.FN)rNrF�stop)rQrSrSrTr��s
z
Coverage.stopcCs |jr|��|jr|��dS)zClean up on process shutdown.N)rNr�r8�save)rQrSrSrTr��szCoverage._atexitcCs2|��|j��|j��|jj|jjd�dS)z�Erase previously-collected coverage data.

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

        )r(N)r�rFr�rD�eraserEr.r()rQrSrSrTr��s

zCoverage.erase�excludecCs&|��t|j|dg�|��dS)zClear the exclude list.�_listN)r��setattrr.rc)rQ�whichrSrSrT�
clear_exclude�szCoverage.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)r�r�r.rfrc)rQZregexr��	excl_listrSrSrTr��s
zCoverage.excludecCs|j��dS)z=Drop all the compiled exclusion regexes, a list was modified.N)rL�clear)rQrSrSrTrc�szCoverage._exclude_regex_stalecCs2||jkr(t|j|d�}t|�|j|<|j|S)z5Return a compiled regex for the given exclusion list.r�)rLr�r.r)rQr�r�rSrSrT�_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�)r�r�r.)rQr�rSrSrT�get_exclude_listszCoverage.get_exclude_listcCs(|��|��|jj|j|jd�dS)z2Save the collected coverage data to the data file.)�suffixN)r��get_datarEr�rDrJ)rQrSrSrTr�sz
Coverage.savecCsz|��|��d}|jjrbt�}x>|jj��D].}|d}x |dd�D]}|�||�qJWq0W|jj|j	||d�dS)aRCombine 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.

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

        Nr�)�aliases�
data_paths)
r�r�r.�pathsr�valuesrxrEZcombine_parallel_datarD)rQr�r�r��result�patternrSrSrT�combineszCoverage.combinecCs|��|js|jS|j�|j�|jr�xj|jD]`}|tjkrN|�	d|�q0t
tj|d�rrtj�
tj|j�s�|�	d|�q0|�	d|�q0W|js�|jr�|�	d�xJ|jD]@}x:t|�D].}t�|�}|jr�|j�|�r�q�|j�|�q�Wq�W|jj�r|jj|jjd�d|_|jS)z�Get the collected data and reset the collector.

        Also warn about various problems collecting data.

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

        .. versionadded:: 4.0

        zModule %s was never imported.r^zModule %s has no Python source.z4Module %s was previously imported, but not measured.zNo data was collected.)�noteF)r�rOrDrFZ	save_datarArCr_�modulesrjrwr1rdrer^r@r)rrrgr?r�Z
touch_filer.r�Zadd_run_info)rQ�pkgr��py_filerSrSrTr�.s0




zCoverage.get_datacCs |�|�\}}}}}||||fS)z:Like `analysis2` but doesn't return excluded line numbers.)�	analysis2)rQr��f�s�_r�ZmfrSrSrT�analysiscszCoverage.analysiscCs8|��|�|�}|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.

        )r��_analyzer�r�Z
statementsZexcluded�missingZmissing_formatted)rQr�r�rSrSrTr�hs
zCoverage.analysis2cCs(|��t|t�s|�|�}t|j|�S)zTAnalyze a single morf or code unit.

        Returns an `Analysis` object.

        )r�ror�_get_file_reporterrrD)rQ�itrSrSrTr��s

zCoverage._analyzecCstd}d}t|t�r6t|�}|j�|�}|r6|j�|�}|r^|�|�}|dkr^td|j	|f��|dkrpt
||�}|S)z-Get a FileReporter for a module or file name.N�pythonz1Plugin %r did not provide a file reporter for %r.)rorrrDr�rGr3�
file_reporterrrYr)rQr�r[r�Zabs_morfZplugin_namerSrSrTr��s 


zCoverage._get_file_reportercCsL|s|j��}t|ttf�s"|g}g}x |D]}|�|�}|�|�q,W|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.

        )rDZmeasured_filesro�list�tupler�rf)rQ�morfsZfile_reportersr�r�rSrSrT�_get_file_reporters�s


zCoverage._get_file_reportersc	Cs8|��|jj|||||d�t||j�}|j||d�S)a�Write a summary report to `file`.

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

        `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.

        Returns a float, the total percentage covered.

        )�
ignore_errorsr*r+�show_missing�skip_covered)�outfile)r�r.r6r�report)	rQr�r�r��filer*r+r��reporterrSrSrTr��s
zCoverage.reportcCs8|��|jj|||d�t||j�}|j||d�dS)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+)�	directoryN)r�r.r6rr�)rQr�r�r�r*r+r�rSrSrT�annotate�s
zCoverage.annotatec	Cs6|��|jj||||||d�t||j�}|�|�S)aGenerate 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.

        )r�r*r+Zhtml_dir�	extra_cssZ
html_title)r�r.r6rr�)	rQr�r�r�r*r+r��titler�rSrSrT�html_report�szCoverage.html_reportcCs�|��|jj||||d�d}d}|jjr�|jjdkr@tj}nRtj�|jj�}|rjtj�	|�sjt�
|�i}	tjr|d|	d<t
|jjdf|	�}|}z:yt||j�}
|
j||d�Stk
r�d	}�YnXWd|r�|��|r�t|jj�XdS)
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_outputNF�-�utf8�encodingr�)r�T)r�r.r6r�r_�stdoutr1rd�dirname�isdir�makedirsr�PY3rar r�r�closer)rQr�r�r�r*r+Z
file_to_closeZdelete_file�
output_dirZopen_kwargsr�rSrSrT�
xml_reports6
zCoverage.xml_reportc
CsVddl}|��g}x.|jjD]"}|j}|js6|d7}|�|�qWd|jfd|jfd|j	fd|j
fd|j��fd	|fd
|j
jfd|j
jfd|jjfd
tj�dd�fdt��fdt��fdtjfdt��fdtjfdtdd�ttj�D��fdd�ttddg��fg}ddddd d!g}x:|D]2}t||�}|�r:|� �}	nd"}	|�||	f��qW|S)#zAReturn a list of (key, value) pairs showing internal information.rNz (disabled)�version�coveragerIrHZtracerzplugins.file_tracers�config_filesZconfigs_readZ	data_pathr��
�rs�implementation�
executable�cwdrd�environmentcss(|] \}}|�d�rd||fVqdS))ZCOVZPYz%s = %sN)r�)rZ�k�vrSrSrTr\]sz$Coverage.sys_info.<locals>.<genexpr>Zcommand_line� �argvz???r:r;r>r?r=r<z-none-)!rr�rGrkrYrnrf�__version__r^rIrHrFrmr.Zattempted_config_filesrrEr�r_r�replacers�python_implementationrr1�getcwdrdr�rr2rlr�r�)
rQZcovmodZ
ft_pluginsZftZft_namer�Z
matcher_namesZmatcher_nameZmatcherZmatcher_inforSrSrTr�>sJ








zCoverage.sys_info)NNNFNNTNNNNN)r�)r�)r�)N)N)NNNNNNN)NNNNN)NNNNNNN)NNNNN)(r��
__module__�__qualname__�__doc__rUr�ryr�r�r�r�rhrirjr�r�r�r�r�r�r�r�r�r�rcr�r�r�r�r�r�r�r�r�r�r�r�r�rr�rSrSrSrTr!-s^

( $l*




5




1r!cCs4|�}||_||_d|_d|_d|_d|_d|_|S)z6Construct and initialize a new FileDisposition object.NFr	)r�rgr�r�r�r�r�)�clsr�r�rSrSrTr�ysr�cCs<|jr(d|jf}|jr8|d|j7}nd|j|jf}|S)z?Make a nice debug message of what the FileDisposition is doing.z
Tracing %rz: will be traced by %rzNot tracing %r: %s)r�r�r�r�)r�r�rSrSrTr��sr�cCsLtj�d�}|sdSttd�r"dSt|dd�}|t_|��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_STARTNrT)r/rRF)
r1r2r3rw�process_startupr!rr�r@rA)ZcpsZcovrSrSrTr�s
rcCsttdd�}|dk	rd|_dS)z7Stop any subprocess auto-measurement from writing data.rNF)r�rr8)Zauto_created_coveragerSrSrTrP�srP)@rrqrrr1rsrtr_rvrrrZcoverage.annotaterZcoverage.backwardrrZcoverage.collectorrZcoverage.configrZ
coverage.datar	r
Zcoverage.debugrZcoverage.filesrr
rrrrrZ
coverage.htmlrZ
coverage.miscrrrrrZcoverage.multiprocrZcoverage.pluginrZcoverage.plugin_supportrZcoverage.pythonrZcoverage.resultsrrZcoverage.summaryrZcoverage.xmlreportr ru�ImportError�objectr!r�r�rrPrSrSrSrT�<module>sZ
T
4