diff options
author | agrieve <agrieve@chromium.org> | 2016-03-24 13:06:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-24 20:08:06 +0000 |
commit | 9e299ea6bbf87415d64d9d84003162d71304ccb9 (patch) | |
tree | 5bf1ea48b3b6e70e99cd12bdea23a73358c4ac04 /PRESUBMIT_test_mocks.py | |
parent | c38d1f4bce5165b0114fc9c429812e93f64850bf (diff) | |
download | chromium_src-9e299ea6bbf87415d64d9d84003162d71304ccb9.zip chromium_src-9e299ea6bbf87415d64d9d84003162d71304ccb9.tar.gz chromium_src-9e299ea6bbf87415d64d9d84003162d71304ccb9.tar.bz2 |
Include isolate.py in data for Android unit tests
This is required for any test that uses an .isolate to push files to the
device (e.g. base_unittests).
BUG=589318
Review URL: https://codereview.chromium.org/1784373002
Cr-Commit-Position: refs/heads/master@{#383127}
Diffstat (limited to 'PRESUBMIT_test_mocks.py')
-rw-r--r-- | PRESUBMIT_test_mocks.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/PRESUBMIT_test_mocks.py b/PRESUBMIT_test_mocks.py index 5230c87..373b52c6 100644 --- a/PRESUBMIT_test_mocks.py +++ b/PRESUBMIT_test_mocks.py @@ -26,7 +26,7 @@ class MockInputApi(object): self.is_committing = False self.change = MockChange([]) - def AffectedFiles(self, file_filter=None): + def AffectedFiles(self, file_filter=None, include_deletes=False): return self.files def AffectedSourceFiles(self, file_filter=None): @@ -92,13 +92,14 @@ class MockFile(object): MockInputApi for presubmit unittests. """ - def __init__(self, local_path, new_contents): + def __init__(self, local_path, new_contents, action='A'): self._local_path = local_path self._new_contents = new_contents self._changed_contents = [(i + 1, l) for i, l in enumerate(new_contents)] + self._action = action def Action(self): - return 'A' # TODO(dbeam): feel free to change if your test actually uses. + return self._action def ChangedContents(self): return self._changed_contents |