зеркало из https://github.com/mozilla/gecko-dev.git
89 строки
2.4 KiB
INI
89 строки
2.4 KiB
INI
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
|
|
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
|
|
|
|
# Settings to use when using coverage.py to measure itself, known as
|
|
# meta-coverage. This gets intricate because we need to keep the coverage
|
|
# measurement happening in the tests separate from our own coverage measurement
|
|
# of coverage.py itself.
|
|
|
|
[run]
|
|
branch = true
|
|
data_file = ${COVERAGE_METAFILE?}
|
|
parallel = true
|
|
source =
|
|
${COVERAGE_HOME-.}/coverage
|
|
${COVERAGE_HOME-.}/tests
|
|
# $set_env.py: COVERAGE_CONTEXT - Set to 'test_function' for who-tests-what
|
|
dynamic_context = ${COVERAGE_CONTEXT-none}
|
|
|
|
[report]
|
|
# We set a different pragmas so our code won't be confused with test code, and
|
|
# we use different pragmas for different reasons that the lines won't be
|
|
# measured.
|
|
exclude_lines =
|
|
pragma: not covered
|
|
|
|
# Lines in test code that aren't covered: we are nested inside ourselves.
|
|
# Sometimes this is used as a comment:
|
|
#
|
|
# cov.start()
|
|
# blah() # pragma: nested
|
|
# cov.stop() # pragma: nested
|
|
#
|
|
# In order to exclude a series of lines, sometimes it's used as a constant
|
|
# condition, which might be too cute:
|
|
#
|
|
# cov.start()
|
|
# if "pragma: nested":
|
|
# blah()
|
|
# cov.stop()
|
|
#
|
|
pragma: nested
|
|
|
|
# Lines that are only executed when we are debugging coverage.py.
|
|
def __repr__
|
|
pragma: debugging
|
|
|
|
# Lines that are only executed when we are not testing coverage.py.
|
|
pragma: not testing
|
|
|
|
# Lines that we can't run during metacov.
|
|
pragma: no metacov
|
|
|
|
# These lines only happen if tests fail.
|
|
raise AssertionError
|
|
pragma: only failure
|
|
|
|
# OS error conditions that we can't (or don't care to) replicate.
|
|
pragma: cant happen
|
|
|
|
# Obscure bugs in specific versions of interpreters, and so probably no
|
|
# longer tested.
|
|
pragma: obscure
|
|
|
|
# Jython needs special care.
|
|
pragma: only jython
|
|
skip.*Jython
|
|
|
|
# IronPython isn't included in metacoverage.
|
|
pragma: only ironpython
|
|
|
|
partial_branches =
|
|
pragma: part covered
|
|
pragma: if failure
|
|
pragma: part started
|
|
if env.TESTING:
|
|
if .* env.JYTHON
|
|
if .* env.IRONPYTHON
|
|
|
|
ignore_errors = true
|
|
precision = 1
|
|
|
|
[paths]
|
|
source =
|
|
.
|
|
*\coverage\trunk
|
|
*/coverage/trunk
|
|
*\coveragepy
|
|
/io
|