| 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 scm.py.""" | 6 """Unit tests for scm.py.""" |
| 7 | 7 |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 'CaptureStatus', | 78 'CaptureStatus', |
| 79 'current_version', | 79 'current_version', |
| 80 'FetchUpstreamTuple', | 80 'FetchUpstreamTuple', |
| 81 'GenerateDiff', | 81 'GenerateDiff', |
| 82 'GetBlessedSha1ForSvnRev', | 82 'GetBlessedSha1ForSvnRev', |
| 83 'GetBranch', | 83 'GetBranch', |
| 84 'GetBranchRef', | 84 'GetBranchRef', |
| 85 'GetCheckoutRoot', | 85 'GetCheckoutRoot', |
| 86 'GetDifferentFiles', | 86 'GetDifferentFiles', |
| 87 'GetEmail', | 87 'GetEmail', |
| 88 'GetGitDir', |
| 88 'GetGitSvnHeadRev', | 89 'GetGitSvnHeadRev', |
| 89 'GetPatchName', | 90 'GetPatchName', |
| 90 'GetSha1ForSvnRev', | 91 'GetSha1ForSvnRev', |
| 91 'GetSVNBranch', | 92 'GetSVNBranch', |
| 92 'GetUpstreamBranch', | 93 'GetUpstreamBranch', |
| 93 'IsGitSvn', | 94 'IsGitSvn', |
| 95 'IsInsideWorkTree', |
| 94 'IsValidRevision', | 96 'IsValidRevision', |
| 97 'IsWorkTreeDirty', |
| 95 'MatchSvnGlob', | 98 'MatchSvnGlob', |
| 96 'ParseGitSvnSha1', | 99 'ParseGitSvnSha1', |
| 97 'ShortBranchName', | 100 'ShortBranchName', |
| 98 ] | 101 ] |
| 99 # If this test fails, you should add the relevant test. | 102 # If this test fails, you should add the relevant test. |
| 100 self.compareMembers(scm.GIT, members) | 103 self.compareMembers(scm.GIT, members) |
| 101 | 104 |
| 102 def testGetEmail(self): | 105 def testGetEmail(self): |
| 103 self.mox.StubOutWithMock(scm.GIT, 'Capture') | 106 self.mox.StubOutWithMock(scm.GIT, 'Capture') |
| 104 scm.GIT.Capture(['config', 'user.email'], cwd=self.root_dir | 107 scm.GIT.Capture(['config', 'user.email'], cwd=self.root_dir |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 # Asserting the tree is not sufficient, svn status must come out clear too. | 469 # Asserting the tree is not sufficient, svn status must come out clear too. |
| 467 self.assertEquals('', self._capture(['status'])) | 470 self.assertEquals('', self._capture(['status'])) |
| 468 | 471 |
| 469 | 472 |
| 470 if __name__ == '__main__': | 473 if __name__ == '__main__': |
| 471 if '-v' in sys.argv: | 474 if '-v' in sys.argv: |
| 472 logging.basicConfig(level=logging.DEBUG) | 475 logging.basicConfig(level=logging.DEBUG) |
| 473 unittest.main() | 476 unittest.main() |
| 474 | 477 |
| 475 # vim: ts=2:sw=2:tw=80:et: | 478 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |