Initialize MockInputApi's verbosity
With this change, the input api's verbosity is set up by looking for the '--verbose' argument. credit: approach was recommended by brucedawson@. Bug: None Change-Id: I1e71dc2f798d63e2391496d885467787738b5168 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4247059 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Commit-Queue: Ian Vollick <vollick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1104813}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
ef9a1cf313
commit
9d42a072b2
@ -80,6 +80,10 @@ class MockInputApi(object):
|
||||
self.presubmit_local_path = os.path.dirname(__file__)
|
||||
self.is_windows = sys.platform == 'win32'
|
||||
self.no_diffs = False
|
||||
# Although this makes assumptions about command line arguments used by test
|
||||
# scripts that create mocks, it is a convenient way to set up the verbosity
|
||||
# via the input api.
|
||||
self.verbose = '--verbose' in sys.argv
|
||||
|
||||
def CreateMockFileInPath(self, f_list):
|
||||
self.os_path.exists = lambda x: x in f_list
|
||||
|
@ -20,7 +20,6 @@ class BundleDataPresubmit(unittest.TestCase):
|
||||
os.path.dirname(__file__), '..', '..')
|
||||
self.mock_input_api.PresubmitLocalPath = lambda: os.path.dirname(__file__)
|
||||
self.mock_output_api = MockOutputApi()
|
||||
self.mock_input_api.verbose = False
|
||||
|
||||
def testBasic(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user