Commit 39cec0e7 authored by iannucci's avatar iannucci Committed by Commit bot

Disable coverage in depot_tools tests.

R=dnj@chromium.org, martiniss@chromium.org
BUG=662277

Review-Url: https://codereview.chromium.org/2471133006
parent 8c4faee3
...@@ -21,7 +21,8 @@ def native_error(msg, version): ...@@ -21,7 +21,8 @@ def native_error(msg, version):
%s""") % (version, msg) %s""") % (version, msg)
sys.exit(1) sys.exit(1)
def covered_main(includes, require_native=None, required_percentage=100.0): def covered_main(includes, require_native=None, required_percentage=100.0,
disable_coverage=True):
"""Equivalent of unittest.main(), except that it gathers coverage data, and """Equivalent of unittest.main(), except that it gathers coverage data, and
asserts if the test is not at 100% coverage. asserts if the test is not at 100% coverage.
...@@ -31,7 +32,13 @@ def covered_main(includes, require_native=None, required_percentage=100.0): ...@@ -31,7 +32,13 @@ def covered_main(includes, require_native=None, required_percentage=100.0):
require_native (str) - If non-None, will require that require_native (str) - If non-None, will require that
at least |require_native| version of coverage is installed on the at least |require_native| version of coverage is installed on the
system with CTracer. system with CTracer.
disable_coverage (bool) - If True, just run unittest.main() without any
coverage tracking. Bug: crbug.com/662277
""" """
if disable_coverage:
unittest.main()
return
try: try:
import coverage import coverage
if require_native is not None: if require_native is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment