| 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 from shutil import rmtree | 8 from shutil import rmtree |
| 9 import tempfile | 9 import tempfile |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 self.mox.StubOutWithMock(scm.gclient_utils, 'SubprocessCall') | 21 self.mox.StubOutWithMock(scm.gclient_utils, 'SubprocessCall') |
| 22 self.mox.StubOutWithMock(scm.gclient_utils, 'SubprocessCallAndFilter') | 22 self.mox.StubOutWithMock(scm.gclient_utils, 'SubprocessCallAndFilter') |
| 23 | 23 |
| 24 | 24 |
| 25 class RootTestCase(BaseSCMTestCase): | 25 class RootTestCase(BaseSCMTestCase): |
| 26 def testMembersChanged(self): | 26 def testMembersChanged(self): |
| 27 self.mox.ReplayAll() | 27 self.mox.ReplayAll() |
| 28 members = [ | 28 members = [ |
| 29 'GetCasedPath', 'GIT', 'SVN', 'ValidateEmail', | 29 'GetCasedPath', 'GIT', 'SVN', 'ValidateEmail', |
| 30 'gclient_utils', 'glob', 'os', 're', 'shutil', 'subprocess', 'sys', | 30 'gclient_utils', 'glob', 'os', 're', 'shutil', 'subprocess', 'sys', |
| 31 'tempfile', 'xml', | 31 'tempfile', 'time', 'xml', |
| 32 ] | 32 ] |
| 33 # If this test fails, you should add the relevant test. | 33 # If this test fails, you should add the relevant test. |
| 34 self.compareMembers(scm, members) | 34 self.compareMembers(scm, members) |
| 35 | 35 |
| 36 | 36 |
| 37 class GitWrapperTestCase(SuperMoxBaseTestBase): | 37 class GitWrapperTestCase(SuperMoxBaseTestBase): |
| 38 sample_git_import = """blob | 38 sample_git_import = """blob |
| 39 mark :1 | 39 mark :1 |
| 40 data 6 | 40 data 6 |
| 41 Hello | 41 Hello |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 self.mox.ReplayAll() | 326 self.mox.ReplayAll() |
| 327 info = scm.SVN.CaptureStatus(None) | 327 info = scm.SVN.CaptureStatus(None) |
| 328 self.assertEquals(info, []) | 328 self.assertEquals(info, []) |
| 329 | 329 |
| 330 | 330 |
| 331 if __name__ == '__main__': | 331 if __name__ == '__main__': |
| 332 import unittest | 332 import unittest |
| 333 unittest.main() | 333 unittest.main() |
| 334 | 334 |
| 335 # vim: ts=2:sw=2:tw=80:et: | 335 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |