OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 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 shutil | 8 import shutil |
9 import tempfile | 9 import tempfile |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 BaseSCMTestCase.setUp(self) | 132 BaseSCMTestCase.setUp(self) |
133 self.root_dir = self.Dir() | 133 self.root_dir = self.Dir() |
134 self.args = self.Args() | 134 self.args = self.Args() |
135 self.url = self.Url() | 135 self.url = self.Url() |
136 self.relpath = 'asf' | 136 self.relpath = 'asf' |
137 | 137 |
138 def testMembersChanged(self): | 138 def testMembersChanged(self): |
139 self.mox.ReplayAll() | 139 self.mox.ReplayAll() |
140 members = [ | 140 members = [ |
141 'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo', | 141 'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo', |
142 'CaptureStatus', 'DiffItem', 'GetEmail', 'GetFileProperty', 'IsMoved', | 142 'CaptureStatus', 'DiffItem', 'GetCheckoutRoot', 'GetEmail', |
| 143 'GetFileProperty', 'IsMoved', |
143 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', | 144 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', |
144 ] | 145 ] |
145 # If this test fails, you should add the relevant test. | 146 # If this test fails, you should add the relevant test. |
146 self.compareMembers(scm.SVN, members) | 147 self.compareMembers(scm.SVN, members) |
147 | 148 |
148 def testGetFileInfo(self): | 149 def testGetFileInfo(self): |
149 xml_text = r"""<?xml version="1.0"?> | 150 xml_text = r"""<?xml version="1.0"?> |
150 <info> | 151 <info> |
151 <entry kind="file" path="%s" revision="14628"> | 152 <entry kind="file" path="%s" revision="14628"> |
152 <url>http://src.chromium.org/svn/trunk/src/chrome/app/d</url> | 153 <url>http://src.chromium.org/svn/trunk/src/chrome/app/d</url> |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 self.mox.ReplayAll() | 302 self.mox.ReplayAll() |
302 info = scm.SVN.CaptureStatus(None) | 303 info = scm.SVN.CaptureStatus(None) |
303 self.assertEquals(info, []) | 304 self.assertEquals(info, []) |
304 | 305 |
305 | 306 |
306 if __name__ == '__main__': | 307 if __name__ == '__main__': |
307 import unittest | 308 import unittest |
308 unittest.main() | 309 unittest.main() |
309 | 310 |
310 # vim: ts=2:sw=2:tw=80:et: | 311 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |