Repository URL to install this package:
|
Version:
1.0.11 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
coverage
/
__pycache__
/
control.cpython-37.pyc
|
|---|
B
õF¢óã @ s< d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
mZ ddlm
Z
ddlmZmZ ddlmZ ddlmZmZ ddlmZmZ dd lmZmZmZ dd
lmZ ddlm Z m!Z!m"Z"m#Z# ddl$m%Z%m&Z&m'Z'm(Z( dd
l)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0m1Z1m2Z2m3Z3 ddl/m4Z4m5Z5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z< ddl=m>Z> ddl?m@Z@ ddlAmBZB ddlCmDZD yddlEmFZF W n eGk
r¾ dZFY nX e6eZejHdd ZIe4dZJG dd dZKeLejM Ndd¡r(dd lmOZOmPZP eOePd!d"d#gd$eKZKd%d& ZQd'd( ZRdS ))z#Core control stuff for coverage.py.é N)Úenv)ÚAnnotateReporter)Ú 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)ÚConfigErrorÚCoverageExceptionÚCoverageWarningÚPluginError)ÚPathAliasesÚabs_fileÚrelative_filenameÚset_relative_directory)ÚHtmlReporter)ÚInOrOut)ÚJsonReporter)Úbool_or_noneÚ
join_regexÚhuman_sortedÚhuman_sorted_items)ÚDefaultValueÚensure_dir_for_fileÚisolate_module)ÚFileReporter)ÚPlugins)ÚPythonFileReporter)Ú
render_report)ÚAnalysis)ÚSummaryReporter)ÚXmlReporter)Úpatch_multiprocessingc k s8 | j }| j ¡ | _ z| j jf | dV W d|| _ X dS )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-7IIg1Q/wlanpi-profiler-1.0.11/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/control.pyÚoverride_config/ s
r/ ÚMISSINGc @ s e Zd ZdZg Zedd ZedddddddddddddddfddZd d
Z dd Z
d
d Zdd Zdd Z
dTddZdd Zdd Zdd Zdd Zdd Zdd Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* ZdUd,d-ZdVd.d/Zd0d1 Zd2d3 ZdWd4d5Zd6d7 ZdXd8d9Z d:d; Z!d<d= Z"d>d? Z#d@dA Z$dBdC Z%dDdE Z&dYdFdGZ'dZdHdIZ(d[dJdKZ)d\dLdMZ*d]dNdOZ+d^dPdQZ,dRdS 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.
Methods can raise any of the exceptions described in :ref:`api_exceptions`.
c C s | j r| j d S dS dS )zGet the latest started `Coverage` instance, if any.
Returns: a `Coverage` instance, or None.
.. versionadded:: 5.0
éÿÿÿÿN)Ú
_instances)Úclsr- r- r. ÚcurrentY s
zCoverage.currentNFTc C sæ |dk| _ |tkrd}d| _d| _| | _| _|| _d| _d| _|| _ d| _
|| _g | _d | _
| _d| _d| _d | _| _d| _d| _d| _d| _d| _d| _d| _t|| j||||t||| |
|||
||
|d| _tjsât dS )aÿ
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.
If `messages` is true, some messages will be printed to stdout
indicating what is happening.
.. 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.
.. versionadded:: 6.0
The `messages` parameter.
NTF)Úconfig_fileÚwarnÚ data_fileÚcover_pylibÚtimidÚbranchÚparallelÚsourceÚsource_pkgsZrun_omitZrun_includeÚdebugÚreport_omitÚreport_includeÚconcurrencyÚcontext) Ú_no_diskÚ_DEFAULT_DATAFILEr) Ú_debug_fileÚ
_auto_loadÚ
_auto_saveÚ_data_suffix_specifiedÚ
_warn_no_dataÚ_warn_unimported_sourceÚ_warn_preimported_sourceÚ_no_warn_slugsÚ _messagesÚ _warningsÚ_dataÚ
_collectorÚ_pluginsÚ_inoroutZ_data_suffixZ_run_suffixÚ_exclude_reÚ_debugÚ_file_mapperÚ_initedÚ_inited_for_startÚ_startedÚ_should_write_debugr Ú_warnr r ZMETACOVÚ _prevent_sub_process_measurement)Úselfr8 Zdata_suffixr9 Z auto_datar: r; r6 r= r>