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

Side by Side Diff: testing_support/git_test_utils.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 | « testing_support/gerrit_test_case.py ('k') | tests/git_common_test.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 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import atexit 5 import atexit
6 import collections 6 import collections
7 import copy 7 import copy
8 import datetime 8 import datetime
9 import hashlib 9 import hashlib
10 import os 10 import os
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 class GitRepo(object): 233 class GitRepo(object):
234 """Creates a real git repo for a GitRepoSchema. 234 """Creates a real git repo for a GitRepoSchema.
235 235
236 Obtains schema and content information from the GitRepoSchema. 236 Obtains schema and content information from the GitRepoSchema.
237 237
238 The format for the commit data supplied by GitRepoSchema.data_for is: 238 The format for the commit data supplied by GitRepoSchema.data_for is:
239 { 239 {
240 SPECIAL_KEY: special_value, 240 SPECIAL_KEY: special_value,
241 ... 241 ...
242 "path/to/some/file": { 'data': "some data content for this file", 242 "path/to/some/file": { 'data': "some data content for this file",
243 'mode': 0o0755 }, 243 'mode': 0o755 },
244 ... 244 ...
245 } 245 }
246 246
247 The SPECIAL_KEYs are the following attribues of the GitRepo class: 247 The SPECIAL_KEYs are the following attribues of the GitRepo class:
248 * AUTHOR_NAME 248 * AUTHOR_NAME
249 * AUTHOR_EMAIL 249 * AUTHOR_EMAIL
250 * AUTHOR_DATE - must be a datetime.datetime instance 250 * AUTHOR_DATE - must be a datetime.datetime instance
251 * COMMITTER_NAME 251 * COMMITTER_NAME
252 * COMMITTER_EMAIL 252 * COMMITTER_EMAIL
253 * COMMITTER_DATE - must be a datetime.datetime instance 253 * COMMITTER_DATE - must be a datetime.datetime instance
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 super(GitRepoReadWriteTestBase, self).setUp() 520 super(GitRepoReadWriteTestBase, self).setUp()
521 self.repo = self.r_schema.reify() 521 self.repo = self.r_schema.reify()
522 522
523 def tearDown(self): 523 def tearDown(self):
524 self.repo.nuke() 524 self.repo.nuke()
525 super(GitRepoReadWriteTestBase, self).tearDown() 525 super(GitRepoReadWriteTestBase, self).tearDown()
526 526
527 def assertSchema(self, schema_string): 527 def assertSchema(self, schema_string):
528 self.assertEqual(GitRepoSchema(schema_string).simple_graph(), 528 self.assertEqual(GitRepoSchema(schema_string).simple_graph(),
529 self.repo.to_schema().simple_graph()) 529 self.repo.to_schema().simple_graph())
OLDNEW
« no previous file with comments | « testing_support/gerrit_test_case.py ('k') | tests/git_common_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698