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

Side by Side Diff: scripts/master/unittests/try_job_base_test.py

Issue 132333022: Keep original revision as a build property. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build/
Patch Set: Created 6 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 | « scripts/master/try_job_base.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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """try_job_base.py testcases.""" 6 """try_job_base.py testcases."""
7 7
8 import unittest 8 import unittest
9 9
10 import test_env # pylint: disable=W0611 10 import test_env # pylint: disable=W0611
11 11
12 from master import try_job_base 12 from master import try_job_base
13 13
14 14
15 class PaseOptionsTest(unittest.TestCase): 15 class PaseOptionsTest(unittest.TestCase):
16 def setUp(self): 16 def setUp(self):
17 self.DEFAULT = 'DEFAULT' 17 self.DEFAULT = 'DEFAULT'
18 self.VALID_KEYS = ['linux', 'linux_chromeos', 'mac', 'win'] 18 self.VALID_KEYS = ['linux', 'linux_chromeos', 'mac', 'win']
19 19
20 @staticmethod 20 @staticmethod
21 def _get_default(): 21 def _get_default():
22 return { 22 return {
23 'bot': {}, 23 'bot': {},
24 'branch': None, 24 'branch': None,
25 'clobber': False, 25 'clobber': False,
26 'email': [], 26 'email': [],
27 'issue': None, 27 'issue': None,
28 'name': 'Unnamed', 28 'name': 'Unnamed',
29 'orig_revision': None,
29 'patch': None, 30 'patch': None,
30 'patchlevel': 0, 31 'patchlevel': 0,
31 'patchset': None, 32 'patchset': None,
32 'project': None, 33 'project': None,
33 'reason': 'John Doe: Unnamed', 34 'reason': 'John Doe: Unnamed',
34 'requester': None, 35 'requester': None,
35 'repository': None, 36 'repository': None,
36 'revision': None, 37 'revision': None,
37 'root': None, 38 'root': None,
38 'testfilter': [], 39 'testfilter': [],
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 'DUPE=dupe2\n') 214 'DUPE=dupe2\n')
214 expected = { 215 expected = {
215 'foo': ['bar'], 216 'foo': ['bar'],
216 'DUPE': ['dupe1', 'dupe2'], 217 'DUPE': ['dupe1', 'dupe2'],
217 } 218 }
218 self.assertEquals(expected, try_job_base.text_to_dict(text)) 219 self.assertEquals(expected, try_job_base.text_to_dict(text))
219 220
220 221
221 if __name__ == '__main__': 222 if __name__ == '__main__':
222 unittest.main() 223 unittest.main()
OLDNEW
« no previous file with comments | « scripts/master/try_job_base.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698