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

Side by Side Diff: tests/git_cl_test.py

Issue 2319903002: Remove redundant output in git_cl.py tests. (Closed)
Patch Set: Created 4 years, 3 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 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 ((['git', 'diff', 'deadbeaf'],), ''), # No diff. 1950 ((['git', 'diff', 'deadbeaf'],), ''), # No diff.
1951 ((['git', 'config', 'branch.feature.gerritserver'],), 1951 ((['git', 'config', 'branch.feature.gerritserver'],),
1952 'chromium-review.googlesource.com'), 1952 'chromium-review.googlesource.com'),
1953 ] 1953 ]
1954 cl = git_cl.Changelist(issue=123, codereview='gerrit') 1954 cl = git_cl.Changelist(issue=123, codereview='gerrit')
1955 cl._codereview_impl._GetChangeDetail = lambda _: { 1955 cl._codereview_impl._GetChangeDetail = lambda _: {
1956 'labels': {}, 1956 'labels': {},
1957 'current_revision': 'deadbeaf', 1957 'current_revision': 'deadbeaf',
1958 } 1958 }
1959 cl._codereview_impl.SubmitIssue = lambda wait_for_merge: None 1959 cl._codereview_impl.SubmitIssue = lambda wait_for_merge: None
1960 out = StringIO.StringIO()
1961 self.mock(sys, 'stdout', out)
1960 self.assertEqual(0, cl.CMDLand(force=True, bypass_hooks=True, verbose=True)) 1962 self.assertEqual(0, cl.CMDLand(force=True, bypass_hooks=True, verbose=True))
1963 self.assertRegexpMatches(out.getvalue(), 'Issue.*123 has been submitted')
1961 1964
1962 1965
1963 if __name__ == '__main__': 1966 if __name__ == '__main__':
1964 git_cl.logging.basicConfig( 1967 git_cl.logging.basicConfig(
1965 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR) 1968 level=git_cl.logging.DEBUG if '-v' in sys.argv else git_cl.logging.ERROR)
1966 unittest.main() 1969 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