Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: tests/git_hyper_blame_test.py

Issue 2075923003: Simplify octal constants in Python code (e.g. 0o0700 -> 0o700). (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/git_common_test.py ('k') | third_party/upload.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Tests for git_dates.""" 5 """Tests for git_dates."""
6 6
7 import datetime 7 import datetime
8 import os 8 import os
9 import shutil 9 import shutil
10 import StringIO 10 import StringIO
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 COMMIT_A = { 226 COMMIT_A = {
227 'some/files/file1': {'data': 'file1'}, 227 'some/files/file1': {'data': 'file1'},
228 'some/files/file2': {'data': 'file2'}, 228 'some/files/file2': {'data': 'file2'},
229 'some/files/empty': {'data': ''}, 229 'some/files/empty': {'data': ''},
230 'some/other/file': {'data': 'otherfile'}, 230 'some/other/file': {'data': 'otherfile'},
231 } 231 }
232 232
233 COMMIT_B = { 233 COMMIT_B = {
234 'some/files/file2': { 234 'some/files/file2': {
235 'mode': 0o0755, 235 'mode': 0o755,
236 'data': 'file2 - vanilla\n'}, 236 'data': 'file2 - vanilla\n'},
237 'some/files/empty': {'data': 'not anymore'}, 237 'some/files/empty': {'data': 'not anymore'},
238 'some/files/file3': {'data': 'file3'}, 238 'some/files/file3': {'data': 'file3'},
239 } 239 }
240 240
241 COMMIT_C = { 241 COMMIT_C = {
242 'some/files/file2': {'data': 'file2 - merged\n'}, 242 'some/files/file2': {'data': 'file2 - merged\n'},
243 } 243 }
244 244
245 COMMIT_D = { 245 COMMIT_D = {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 self.blame_line('C', ' 9) Z'), 494 self.blame_line('C', ' 9) Z'),
495 ] 495 ]
496 retval, output = self.run_hyperblame(['E'], 'file', 'tag_E') 496 retval, output = self.run_hyperblame(['E'], 'file', 'tag_E')
497 self.assertEqual(0, retval) 497 self.assertEqual(0, retval)
498 self.assertEqual(expected_output, output) 498 self.assertEqual(expected_output, output)
499 499
500 500
501 if __name__ == '__main__': 501 if __name__ == '__main__':
502 sys.exit(coverage_utils.covered_main( 502 sys.exit(coverage_utils.covered_main(
503 os.path.join(DEPOT_TOOLS_ROOT, 'git_hyper_blame.py'))) 503 os.path.join(DEPOT_TOOLS_ROOT, 'git_hyper_blame.py')))
OLDNEW
« no previous file with comments | « tests/git_common_test.py ('k') | third_party/upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698