Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: tests/scm_unittest.py

Issue 1560029: Fix File() to work with SVN 1.4 by using svn export in place... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/gclient_scm_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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', 'CaptureBaseRevision', 'CaptureHeadRevision', 149 'COMMAND', 'AssertVersion', 'Capture', 'CaptureBaseRevision',
150 'CaptureInfo', 'CaptureStatus', 'DiffItem', 'GenerateDiff', 150 'CaptureHeadRevision', 'CaptureInfo', 'CaptureStatus',
151 'GetCheckoutRoot', 'GetEmail', 'GetFileProperty', 'IsMoved', 151 'current_version', 'DiffItem', 'GenerateDiff', 'GetCheckoutRoot',
152 'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList', 152 'GetEmail', 'GetFileProperty', 'IsMoved', 'ReadSimpleAuth', 'Run',
153 'RunAndFilterOutput', 'RunAndGetFileList',
153 ] 154 ]
154 # If this test fails, you should add the relevant test. 155 # If this test fails, you should add the relevant test.
155 self.compareMembers(scm.SVN, members) 156 self.compareMembers(scm.SVN, members)
156 157
157 def testGetCheckoutRoot(self): 158 def testGetCheckoutRoot(self):
158 self.mox.StubOutWithMock(scm.SVN, 'CaptureInfo') 159 self.mox.StubOutWithMock(scm.SVN, 'CaptureInfo')
159 self.mox.StubOutWithMock(scm, 'GetCasedPath') 160 self.mox.StubOutWithMock(scm, 'GetCasedPath')
160 scm.os.path.abspath(self.root_dir + 'x').AndReturn(self.root_dir) 161 scm.os.path.abspath(self.root_dir + 'x').AndReturn(self.root_dir)
161 scm.GetCasedPath(self.root_dir).AndReturn(self.root_dir) 162 scm.GetCasedPath(self.root_dir).AndReturn(self.root_dir)
162 result1 = { "Repository Root": "Some root" } 163 result1 = { "Repository Root": "Some root" }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 self.mox.ReplayAll() 325 self.mox.ReplayAll()
325 info = scm.SVN.CaptureStatus(None) 326 info = scm.SVN.CaptureStatus(None)
326 self.assertEquals(info, []) 327 self.assertEquals(info, [])
327 328
328 329
329 if __name__ == '__main__': 330 if __name__ == '__main__':
330 import unittest 331 import unittest
331 unittest.main() 332 unittest.main()
332 333
333 # vim: ts=2:sw=2:tw=80:et: 334 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « tests/gclient_scm_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698