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

Side by Side Diff: scripts/slave/recipe_test_api.py

Issue 187203005: Minor cleanup of some recipe framework code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 6 years, 9 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 6
7 from .recipe_util import ModuleInjectionSite, static_call, static_wraps 7 from .recipe_util import ModuleInjectionSite, static_call, static_wraps
8 8
9 def combineify(name, dest, a, b): 9 def combineify(name, dest, a, b):
10 """ 10 """
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 'stderr': self._stderr, 131 'stderr': self._stderr,
132 'retcode': self._retcode, 132 'retcode': self._retcode,
133 'override': self.override, 133 'override': self.override,
134 },) 134 },)
135 135
136 136
137 class ModuleTestData(BaseTestData, dict): 137 class ModuleTestData(BaseTestData, dict):
138 """ 138 """
139 Mutable container for test data for a specific module. 139 Mutable container for test data for a specific module.
140 140
141 This test data is consumed at module load time (i.e. when CreateRecipeApi 141 This test data is consumed at module load time (i.e. when create_recipe_api
142 runs). 142 runs).
143 """ 143 """
144 def __add__(self, other): 144 def __add__(self, other):
145 assert isinstance(other, ModuleTestData) 145 assert isinstance(other, ModuleTestData)
146 ret = ModuleTestData() 146 ret = ModuleTestData()
147 ret.update(self) 147 ret.update(self)
148 ret.update(other) 148 ret.update(other)
149 return ret 149 return ret
150 150
151 def __repr__(self): 151 def __repr__(self):
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 def step_data(self, name, *data, **kwargs): 413 def step_data(self, name, *data, **kwargs):
414 """See _step_data()""" 414 """See _step_data()"""
415 return self._step_data(name, *data, **kwargs) 415 return self._step_data(name, *data, **kwargs)
416 step_data.__doc__ = _step_data.__doc__ 416 step_data.__doc__ = _step_data.__doc__
417 417
418 def override_step_data(self, name, *data, **kwargs): 418 def override_step_data(self, name, *data, **kwargs):
419 """See _step_data()""" 419 """See _step_data()"""
420 kwargs['override'] = True 420 kwargs['override'] = True
421 return self._step_data(name, *data, **kwargs) 421 return self._step_data(name, *data, **kwargs)
422 override_step_data.__doc__ = _step_data.__doc__ 422 override_step_data.__doc__ = _step_data.__doc__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698