| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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', 'GetEmail', 'GetFileProperty', 'IsMoved', |
| 143 'ReadEntries', 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', | 143 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', |
| 144 'RunAndGetFileList', | |
| 145 ] | 144 ] |
| 146 # If this test fails, you should add the relevant test. | 145 # If this test fails, you should add the relevant test. |
| 147 self.compareMembers(scm.SVN, members) | 146 self.compareMembers(scm.SVN, members) |
| 148 | 147 |
| 149 def testGetFileInfo(self): | 148 def testGetFileInfo(self): |
| 150 xml_text = r"""<?xml version="1.0"?> | 149 xml_text = r"""<?xml version="1.0"?> |
| 151 <info> | 150 <info> |
| 152 <entry kind="file" path="%s" revision="14628"> | 151 <entry kind="file" path="%s" revision="14628"> |
| 153 <url>http://src.chromium.org/svn/trunk/src/chrome/app/d</url> | 152 <url>http://src.chromium.org/svn/trunk/src/chrome/app/d</url> |
| 154 <repository><root>http://src.chromium.org/svn</root></repository> | 153 <repository><root>http://src.chromium.org/svn</root></repository> |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 self.mox.ReplayAll() | 301 self.mox.ReplayAll() |
| 303 info = scm.SVN.CaptureStatus(None) | 302 info = scm.SVN.CaptureStatus(None) |
| 304 self.assertEquals(info, []) | 303 self.assertEquals(info, []) |
| 305 | 304 |
| 306 | 305 |
| 307 if __name__ == '__main__': | 306 if __name__ == '__main__': |
| 308 import unittest | 307 import unittest |
| 309 unittest.main() | 308 unittest.main() |
| 310 | 309 |
| 311 # vim: ts=2:sw=2:tw=80:et: | 310 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |