| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 # pylint: disable=E1101,W0403 | 8 # pylint: disable=E1101,W0403 |
| 9 | 9 |
| 10 # Fixes include path. | 10 # Fixes include path. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilter') | 32 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilter') |
| 33 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader') | 33 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader') |
| 34 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen') | 34 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen') |
| 35 | 35 |
| 36 | 36 |
| 37 class RootTestCase(BaseSCMTestCase): | 37 class RootTestCase(BaseSCMTestCase): |
| 38 def testMembersChanged(self): | 38 def testMembersChanged(self): |
| 39 self.mox.ReplayAll() | 39 self.mox.ReplayAll() |
| 40 members = [ | 40 members = [ |
| 41 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail', | 41 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail', |
| 42 'cStringIO', 'gclient_utils', 'glob', 'logging', 'os', 're', 'shutil', | 42 'cStringIO', 'determine_scm', 'gclient_utils', 'glob', 'logging', 'os', |
| 43 'subprocess', 'sys', 'tempfile', 'time', 'xml', | 43 're', 'shutil', 'subprocess', 'sys', 'tempfile', 'time', 'xml', |
| 44 ] | 44 ] |
| 45 # If this test fails, you should add the relevant test. | 45 # If this test fails, you should add the relevant test. |
| 46 self.compareMembers(scm, members) | 46 self.compareMembers(scm, members) |
| 47 | 47 |
| 48 | 48 |
| 49 class GitWrapperTestCase(BaseSCMTestCase): | 49 class GitWrapperTestCase(BaseSCMTestCase): |
| 50 def testMembersChanged(self): | 50 def testMembersChanged(self): |
| 51 members = [ | 51 members = [ |
| 52 'AssertVersion', 'Capture', 'CaptureStatus', | 52 'AssertVersion', 'Capture', 'CaptureStatus', |
| 53 'FetchUpstreamTuple', | 53 'FetchUpstreamTuple', |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 self.assertTree(self.tree, self.svn_root) | 311 self.assertTree(self.tree, self.svn_root) |
| 312 # Asserting the tree is not sufficient, svn status must come out clear too. | 312 # Asserting the tree is not sufficient, svn status must come out clear too. |
| 313 self.assertEquals('', self._capture(['status'])) | 313 self.assertEquals('', self._capture(['status'])) |
| 314 | 314 |
| 315 | 315 |
| 316 if __name__ == '__main__': | 316 if __name__ == '__main__': |
| 317 import unittest | 317 import unittest |
| 318 unittest.main() | 318 unittest.main() |
| 319 | 319 |
| 320 # vim: ts=2:sw=2:tw=80:et: | 320 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |