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

Side by Side Diff: tests/gclient_scm_test.py

Issue 650039: Forgot to include the test change. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years, 10 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 | « no previous file | 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 gclient_scm.py.""" 6 """Unit tests for gclient_scm.py."""
7 7
8 # Import before super_mox to keep valid references. 8 # Import before super_mox to keep valid references.
9 from os import rename 9 from os import rename
10 from shutil import rmtree 10 from shutil import rmtree
(...skipping 24 matching lines...) Expand all
35 35
36 36
37 class SVNWrapperTestCase(BaseTestCase): 37 class SVNWrapperTestCase(BaseTestCase):
38 class OptionsObject(object): 38 class OptionsObject(object):
39 def __init__(self, test_case, verbose=False, revision=None): 39 def __init__(self, test_case, verbose=False, revision=None):
40 self.verbose = verbose 40 self.verbose = verbose
41 self.revision = revision 41 self.revision = revision
42 self.manually_grab_svn_rev = True 42 self.manually_grab_svn_rev = True
43 self.deps_os = None 43 self.deps_os = None
44 self.force = False 44 self.force = False
45 self.reset = False
45 self.nohooks = False 46 self.nohooks = False
46 47
47 def Options(self, *args, **kwargs): 48 def Options(self, *args, **kwargs):
48 return self.OptionsObject(self, *args, **kwargs) 49 return self.OptionsObject(self, *args, **kwargs)
49 50
50 def setUp(self): 51 def setUp(self):
51 BaseTestCase.setUp(self) 52 BaseTestCase.setUp(self)
52 self.root_dir = self.Dir() 53 self.root_dir = self.Dir()
53 self.args = self.Args() 54 self.args = self.Args()
54 self.url = self.Url() 55 self.url = self.Url()
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 class GitWrapperTestCase(BaseTestCase): 284 class GitWrapperTestCase(BaseTestCase):
284 """This class doesn't use pymox.""" 285 """This class doesn't use pymox."""
285 class OptionsObject(object): 286 class OptionsObject(object):
286 def __init__(self, test_case, verbose=False, revision=None): 287 def __init__(self, test_case, verbose=False, revision=None):
287 self.verbose = verbose 288 self.verbose = verbose
288 self.revision = revision 289 self.revision = revision
289 self.manually_grab_svn_rev = True 290 self.manually_grab_svn_rev = True
290 self.deps_os = None 291 self.deps_os = None
291 self.force = False 292 self.force = False
293 self.reset = False
292 self.nohooks = False 294 self.nohooks = False
293 295
294 sample_git_import = """blob 296 sample_git_import = """blob
295 mark :1 297 mark :1
296 data 6 298 data 6
297 Hello 299 Hello
298 300
299 blob 301 blob
300 mark :2 302 mark :2
301 data 4 303 data 4
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 relpath=self.relpath) 559 relpath=self.relpath)
558 rev_info = scm.revinfo(options, (), None) 560 rev_info = scm.revinfo(options, (), None)
559 self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458') 561 self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458')
560 562
561 563
562 if __name__ == '__main__': 564 if __name__ == '__main__':
563 import unittest 565 import unittest
564 unittest.main() 566 unittest.main()
565 567
566 # vim: ts=2:sw=2:tw=80:et: 568 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698