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

Side by Side Diff: tests/checkout_test.py

Issue 6020010: Destroy svn_utils.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Rebase against trunk and include a fix to import checkout directly Created 9 years, 12 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 | « svn_utils.py ('k') | tests/svn_utils_test.py » ('j') | 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/env python 1 #!/usr/bin/env 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 checkout.py.""" 6 """Unit tests for checkout.py."""
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class FakeRepos(fake_repos.FakeReposBase): 56 class FakeRepos(fake_repos.FakeReposBase):
57 def populateSvn(self): 57 def populateSvn(self):
58 """Creates a few revisions of changes files.""" 58 """Creates a few revisions of changes files."""
59 checkout.subprocess2.check_call( 59 checkout.subprocess2.check_call(
60 ['svn', 'checkout', 'svn://127.0.0.1/svn', self.svn_root, '-q', 60 ['svn', 'checkout', 'svn://127.0.0.1/svn', self.svn_root, '-q',
61 '--non-interactive', '--no-auth-cache', 61 '--non-interactive', '--no-auth-cache',
62 '--username', 'user1', '--password', 'foo']) 62 '--username', 'user1', '--password', 'foo'])
63 assert os.path.isdir(os.path.join(self.svn_root, '.svn')) 63 assert os.path.isdir(os.path.join(self.svn_root, '.svn'))
64 fs = {} 64 fs = {}
65 fs['trunk/origin'] = 'svn@1' 65 fs['trunk/origin'] = 'svn@1'
66 fs['trunk/codereview.settings'] = read( 66 fs['trunk/codereview.settings'] = (
67 os.path.join(ROOT_DIR, 'svn_utils_test_data', 'codereview.settings')) 67 '# Test data\n'
68 fs['trunk/svn_utils_test.txt'] = read( 68 'bar: pouet\n')
69 os.path.join(ROOT_DIR, 'svn_utils_test_data', 'svn_utils_test.txt')) 69 fs['trunk/svn_utils_test.txt'] = (
70 'a\n'
71 'bb\n'
72 'ccc\n'
73 'dd\n'
74 'e\n'
75 'ff\n'
76 'ggg\n'
77 'hh\n'
78 'i\n'
79 'jj\n'
80 'kkk\n'
81 'll\n'
82 'm\n'
83 'nn\n'
84 'ooo\n'
85 'pp\n'
86 'q\n')
70 self._commit_svn(fs) 87 self._commit_svn(fs)
71 fs['trunk/origin'] = 'svn@2' 88 fs['trunk/origin'] = 'svn@2'
72 fs['trunk/extra'] = 'dummy' 89 fs['trunk/extra'] = 'dummy'
73 self._commit_svn(fs) 90 self._commit_svn(fs)
74 91
75 def populateGit(self): 92 def populateGit(self):
76 raise NotImplementedError() 93 raise NotImplementedError()
77 94
78 95
79 class BaseTest(fake_repos.FakeReposTestBase): 96 class BaseTest(fake_repos.FakeReposTestBase):
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 218
202 219
203 220
204 if __name__ == '__main__': 221 if __name__ == '__main__':
205 if '-v' in sys.argv: 222 if '-v' in sys.argv:
206 DEBUGGING = True 223 DEBUGGING = True
207 logging.basicConfig(level=logging.INFO) 224 logging.basicConfig(level=logging.INFO)
208 else: 225 else:
209 logging.basicConfig(level=logging.ERROR) 226 logging.basicConfig(level=logging.ERROR)
210 unittest.main() 227 unittest.main()
OLDNEW
« no previous file with comments | « svn_utils.py ('k') | tests/svn_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698