| OLD | NEW |
| 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 Loading... |
| 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() |
| OLD | NEW |