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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 def setUp(self): | 139 def setUp(self): |
140 BaseSCMTestCase.setUp(self) | 140 BaseSCMTestCase.setUp(self) |
141 self.root_dir = self.Dir() | 141 self.root_dir = self.Dir() |
142 self.args = self.Args() | 142 self.args = self.Args() |
143 self.url = self.Url() | 143 self.url = self.Url() |
144 self.relpath = 'asf' | 144 self.relpath = 'asf' |
145 | 145 |
146 def testMembersChanged(self): | 146 def testMembersChanged(self): |
147 self.mox.ReplayAll() | 147 self.mox.ReplayAll() |
148 members = [ | 148 members = [ |
149 'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo', | 149 'COMMAND', 'Capture', 'CaptureBaseRevision', 'CaptureHeadRevision', |
150 'CaptureStatus', 'DiffItem', 'GenerateDiff', 'GetCheckoutRoot', | 150 'CaptureInfo', 'CaptureStatus', 'DiffItem', 'GenerateDiff', |
151 'GetEmail', 'GetFileProperty', 'IsMoved', | 151 'GetCheckoutRoot', 'GetEmail', 'GetFileProperty', 'IsMoved', |
152 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', | 152 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', |
153 ] | 153 ] |
154 # If this test fails, you should add the relevant test. | 154 # If this test fails, you should add the relevant test. |
155 self.compareMembers(scm.SVN, members) | 155 self.compareMembers(scm.SVN, members) |
156 | 156 |
157 def testGetCheckoutRoot(self): | 157 def testGetCheckoutRoot(self): |
158 self.mox.StubOutWithMock(scm.SVN, 'CaptureInfo') | 158 self.mox.StubOutWithMock(scm.SVN, 'CaptureInfo') |
159 self.mox.StubOutWithMock(scm, 'GetCasedPath') | 159 self.mox.StubOutWithMock(scm, 'GetCasedPath') |
160 scm.os.path.abspath(self.root_dir + 'x').AndReturn(self.root_dir) | 160 scm.os.path.abspath(self.root_dir + 'x').AndReturn(self.root_dir) |
161 scm.GetCasedPath(self.root_dir).AndReturn(self.root_dir) | 161 scm.GetCasedPath(self.root_dir).AndReturn(self.root_dir) |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 self.mox.ReplayAll() | 324 self.mox.ReplayAll() |
325 info = scm.SVN.CaptureStatus(None) | 325 info = scm.SVN.CaptureStatus(None) |
326 self.assertEquals(info, []) | 326 self.assertEquals(info, []) |
327 | 327 |
328 | 328 |
329 if __name__ == '__main__': | 329 if __name__ == '__main__': |
330 import unittest | 330 import unittest |
331 unittest.main() | 331 unittest.main() |
332 | 332 |
333 # vim: ts=2:sw=2:tw=80:et: | 333 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |