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

Side by Side Diff: tests/git_cl_test.py

Issue 1885963002: Followup for git cl set-commit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | 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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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_cl.py.""" 6 """Unit tests for git_cl.py."""
7 7
8 import os 8 import os
9 import StringIO 9 import StringIO
10 import stat 10 import stat
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1346 ['SetReview', h, i, labels])) 1346 ['SetReview', h, i, labels]))
1347 self.calls = [ 1347 self.calls = [
1348 ((['git', 'symbolic-ref', 'HEAD'],), 'feature'), 1348 ((['git', 'symbolic-ref', 'HEAD'],), 'feature'),
1349 ((['git', 'config', 'branch.feature.rietveldissue'],), ''), 1349 ((['git', 'config', 'branch.feature.rietveldissue'],), ''),
1350 ((['git', 'config', 'branch.feature.gerritissue'],), '123'), 1350 ((['git', 'config', 'branch.feature.gerritissue'],), '123'),
1351 ((['git', 'config', 'branch.feature.gerritserver'],), 1351 ((['git', 'config', 'branch.feature.gerritserver'],),
1352 'https://chromium-review.googlesource.com'), 1352 'https://chromium-review.googlesource.com'),
1353 ((['SetReview', 'chromium-review.googlesource.com', 123, 1353 ((['SetReview', 'chromium-review.googlesource.com', 123,
1354 {'Commit-Queue': 1}],), ''), 1354 {'Commit-Queue': 1}],), ''),
1355 ] 1355 ]
1356 # TODO(tandrii): consider testing just set-commit and set-commit --clear,
1357 # but without copy-pasting tons of expectations, as modifying them later is
1358 # super tedious.
1356 self.assertEqual(0, git_cl.main(['set-commit', '-d'])) 1359 self.assertEqual(0, git_cl.main(['set-commit', '-d']))
1357 1360
1358 1361
1359 if __name__ == '__main__': 1362 if __name__ == '__main__':
1360 git_cl.logging.basicConfig( 1363 git_cl.logging.basicConfig(
1361 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 1364 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
1362 unittest.main() 1365 unittest.main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698