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

Unified Diff: recipe_engine/recipe_test_api.py

Issue 1785543004: Split Placeholder into InputPlaceholder and OutputPlaceholder. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Simplify InputPlaceholder.cleanup Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | recipe_engine/step_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/recipe_test_api.py
diff --git a/recipe_engine/recipe_test_api.py b/recipe_engine/recipe_test_api.py
index 9015267afb6ebfe730a8bb84ead952205403c470..a5e6a0b5e531b002c88007745b3ef4d54e8cb917 100644
--- a/recipe_engine/recipe_test_api.py
+++ b/recipe_engine/recipe_test_api.py
@@ -55,7 +55,7 @@ class StepTestData(BaseTestData):
"""
def __init__(self):
super(StepTestData, self).__init__()
- # { (module, placeholder) -> [data] }
+ # { (module, placeholder) -> [data] }. These are for output placeholders.
self.placeholder_data = collections.defaultdict(list)
self.override = False
self._stdout = None
@@ -284,7 +284,7 @@ def mod_test_data(func):
def placeholder_step_data(func):
"""Decorates RecipeTestApi member functions to allow those functions to
- return just the placeholder data, instead of the normally required
+ return just the output placeholder data, instead of the normally required
StepTestData() object.
The wrapped function may return either:
@@ -338,8 +338,8 @@ def placeholder_step_data(func):
for l in data.placeholder_data.values()
for i in l]
assert len(all_data) == 1, (
- 'placeholder_step_data is only expecting a single placeholder datum. '
- 'Got: %r' % data
+ 'placeholder_step_data is only expecting a single output placeholder '
+ 'datum. Got: %r' % data
)
placeholder_data, retcode = all_data[0], data.retcode
else:
@@ -444,8 +444,10 @@ class RecipeTestApi(object):
retcode for this step.
retcode=(int or None) - Override the retcode for this step, even if it
was set by |data|. This must be set as a keyword arg.
- stdout - StepTestData object with placeholder data for a step's stdout.
- stderr - StepTestData object with placeholder data for a step's stderr.
+ stdout - StepTestData object with a single output placeholder datum for a
+ step's stdout.
+ stderr - StepTestData object with a single output placeholder datum for a
+ step's stderr.
override=(bool) - This step data completely replaces any previously
generated step data, instead of adding on to it.
« no previous file with comments | « no previous file | recipe_engine/step_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698