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

Side by Side Diff: third_party/recipe_engine/unittests/field_composer_test.py

Issue 1151423002: Move recipe engine to third_party/recipe_engine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved field_composer_test with its buddies Created 5 years, 6 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 | « third_party/recipe_engine/third_party/annotator.py ('k') | third_party/recipe_engine/util.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 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 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 import os 6 import os
7 import shutil 7 import shutil
8 import sys
8 import tempfile 9 import tempfile
9 import unittest 10 import unittest
10 11
11 import test_env # pylint: disable=W0403,W0611 12 sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(
12 import sys 13 os.path.abspath(__file__)))))
13 from slave import field_composer 14
15 from recipe_engine import field_composer
14 16
15 17
16 # Functors are compared by reference. 18 # Functors are compared by reference.
17 BEAUTY_LAMBDA = lambda x, y: x + y + 1 19 BEAUTY_LAMBDA = lambda x, y: x + y + 1
18 20
19 21
20 class TestFieldComposer(unittest.TestCase): 22 class TestFieldComposer(unittest.TestCase):
21 23
22 def setUp(self): 24 def setUp(self):
23 super(TestFieldComposer, self).setUp() 25 super(TestFieldComposer, self).setUp()
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 def test_compose_with_sneaky_bad_registry(self): 73 def test_compose_with_sneaky_bad_registry(self):
72 """RegistryConflict must be raised when functors clash.""" 74 """RegistryConflict must be raised when functors clash."""
73 second_fc = field_composer.FieldComposer( 75 second_fc = field_composer.FieldComposer(
74 {}, {'beauty': {'combine': lambda x, y: 0}}) 76 {}, {'beauty': {'combine': lambda x, y: 0}})
75 with self.assertRaises(field_composer.RegistryConflict): 77 with self.assertRaises(field_composer.RegistryConflict):
76 self.fc.compose(second_fc) 78 self.fc.compose(second_fc)
77 79
78 80
79 if __name__ == '__main__': 81 if __name__ == '__main__':
80 unittest.main() 82 unittest.main()
OLDNEW
« no previous file with comments | « third_party/recipe_engine/third_party/annotator.py ('k') | third_party/recipe_engine/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698