OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 from __future__ import with_statement | 9 from __future__ import with_statement |
10 import logging | 10 import logging |
(...skipping 26 matching lines...) Expand all Loading... |
37 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader') | 37 self.mox.StubOutWithMock(scm.gclient_utils, 'CheckCallAndFilterAndHeader') |
38 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen') | 38 self.mox.StubOutWithMock(scm.gclient_utils, 'Popen') |
39 | 39 |
40 | 40 |
41 class RootTestCase(BaseSCMTestCase): | 41 class RootTestCase(BaseSCMTestCase): |
42 def testMembersChanged(self): | 42 def testMembersChanged(self): |
43 self.mox.ReplayAll() | 43 self.mox.ReplayAll() |
44 members = [ | 44 members = [ |
45 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail', | 45 'GetCasedPath', 'GenFakeDiff', 'GIT', 'SVN', 'ValidateEmail', |
46 'cStringIO', 'determine_scm', 'gclient_utils', 'glob', 'logging', 'os', | 46 'cStringIO', 'determine_scm', 'gclient_utils', 'glob', 'logging', 'os', |
47 're', 'shutil', 'subprocess', 'sys', 'tempfile', 'time', 'xml', | 47 're', 'shutil', 'subprocess', 'subprocess2', 'sys', 'tempfile', 'time', |
| 48 'xml', |
48 ] | 49 ] |
49 # If this test fails, you should add the relevant test. | 50 # If this test fails, you should add the relevant test. |
50 self.compareMembers(scm, members) | 51 self.compareMembers(scm, members) |
51 | 52 |
52 | 53 |
53 class GitWrapperTestCase(BaseSCMTestCase): | 54 class GitWrapperTestCase(BaseSCMTestCase): |
54 def testMembersChanged(self): | 55 def testMembersChanged(self): |
55 members = [ | 56 members = [ |
56 'AssertVersion', 'Capture', 'CaptureStatus', | 57 'AssertVersion', 'Capture', 'CaptureStatus', |
57 'FetchUpstreamTuple', | 58 'FetchUpstreamTuple', |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 # Asserting the tree is not sufficient, svn status must come out clear too. | 328 # Asserting the tree is not sufficient, svn status must come out clear too. |
328 self.assertEquals('', self._capture(['status'])) | 329 self.assertEquals('', self._capture(['status'])) |
329 | 330 |
330 | 331 |
331 if __name__ == '__main__': | 332 if __name__ == '__main__': |
332 if '-v' in sys.argv: | 333 if '-v' in sys.argv: |
333 logging.basicConfig(level=logging.DEBUG) | 334 logging.basicConfig(level=logging.DEBUG) |
334 unittest.main() | 335 unittest.main() |
335 | 336 |
336 # vim: ts=2:sw=2:tw=80:et: | 337 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |