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

Side by Side Diff: tests/git_common_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 | « testing_support/git_test_utils.py ('k') | tests/git_hyper_blame_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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 5
6 """Unit tests for git_common.py""" 6 """Unit tests for git_common.py"""
7 7
8 import binascii 8 import binascii
9 import collections 9 import collections
10 import os 10 import os
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 COMMIT_A = { 169 COMMIT_A = {
170 'some/files/file1': {'data': 'file1'}, 170 'some/files/file1': {'data': 'file1'},
171 'some/files/file2': {'data': 'file2'}, 171 'some/files/file2': {'data': 'file2'},
172 'some/files/file3': {'data': 'file3'}, 172 'some/files/file3': {'data': 'file3'},
173 'some/other/file': {'data': 'otherfile'}, 173 'some/other/file': {'data': 'otherfile'},
174 } 174 }
175 175
176 COMMIT_C = { 176 COMMIT_C = {
177 'some/files/file2': { 177 'some/files/file2': {
178 'mode': 0o0755, 178 'mode': 0o755,
179 'data': 'file2 - vanilla\n'}, 179 'data': 'file2 - vanilla\n'},
180 } 180 }
181 181
182 COMMIT_E = { 182 COMMIT_E = {
183 'some/files/file2': {'data': 'file2 - merged\n'}, 183 'some/files/file2': {'data': 'file2 - merged\n'},
184 } 184 }
185 185
186 COMMIT_D = { 186 COMMIT_D = {
187 'some/files/file2': {'data': 'file2 - vanilla\nfile2 - merged\n'}, 187 'some/files/file2': {'data': 'file2 - vanilla\nfile2 - merged\n'},
188 } 188 }
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 743
744 COMMIT_A = { 744 COMMIT_A = {
745 'some/files/file1': {'data': 'file1'}, 745 'some/files/file1': {'data': 'file1'},
746 'some/files/file2': {'data': 'file2'}, 746 'some/files/file2': {'data': 'file2'},
747 'some/files/file3': {'data': 'file3'}, 747 'some/files/file3': {'data': 'file3'},
748 'some/other/file': {'data': 'otherfile'}, 748 'some/other/file': {'data': 'otherfile'},
749 } 749 }
750 750
751 COMMIT_C = { 751 COMMIT_C = {
752 'some/files/file2': { 752 'some/files/file2': {
753 'mode': 0o0755, 753 'mode': 0o755,
754 'data': 'file2 - vanilla'}, 754 'data': 'file2 - vanilla'},
755 } 755 }
756 756
757 COMMIT_E = { 757 COMMIT_E = {
758 'some/files/file2': {'data': 'file2 - merged'}, 758 'some/files/file2': {'data': 'file2 - merged'},
759 } 759 }
760 760
761 COMMIT_D = { 761 COMMIT_D = {
762 'some/files/file2': {'data': 'file2 - vanilla\nfile2 - merged'}, 762 'some/files/file2': {'data': 'file2 - vanilla\nfile2 - merged'},
763 } 763 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 self.repo.show_commit('A', format_string='%cn %ci')) 858 self.repo.show_commit('A', format_string='%cn %ci'))
859 self.assertEquals('Author McAuthorly 1970-01-03 00:00:00 +0000', 859 self.assertEquals('Author McAuthorly 1970-01-03 00:00:00 +0000',
860 self.repo.show_commit('B', format_string='%an %ai')) 860 self.repo.show_commit('B', format_string='%an %ai'))
861 self.assertEquals('Charles Committish 1970-01-04 00:00:00 +0000', 861 self.assertEquals('Charles Committish 1970-01-04 00:00:00 +0000',
862 self.repo.show_commit('B', format_string='%cn %ci')) 862 self.repo.show_commit('B', format_string='%cn %ci'))
863 863
864 864
865 if __name__ == '__main__': 865 if __name__ == '__main__':
866 sys.exit(coverage_utils.covered_main( 866 sys.exit(coverage_utils.covered_main(
867 os.path.join(DEPOT_TOOLS_ROOT, 'git_common.py'))) 867 os.path.join(DEPOT_TOOLS_ROOT, 'git_common.py')))
OLDNEW
« no previous file with comments | « testing_support/git_test_utils.py ('k') | tests/git_hyper_blame_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698