Chromium Code Reviews| Index: recipes/top.py |
| diff --git a/recipes/top.py b/recipes/top.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3441126bc29dc624645da19dde0cd228f4b9b74a |
| --- /dev/null |
| +++ b/recipes/top.py |
| @@ -0,0 +1,25 @@ |
| +from recipe_engine.recipe_api import Property |
| +from recipe_engine import config |
| + |
| +DEPS = [ |
| + 'recipe_engine/properties', |
| +] |
| + |
| +PROPERTIES = { |
| + 'to_pass': Property(), |
| +} |
| + |
| +RETURN_SCHEMA = config.ReturnSchema( |
| + result=config.Single(int), |
| +) |
| + |
| +def RunSteps(api, to_pass): |
| + res = api.depend_on('bottom', {'number': to_pass}) |
| + return RETURN_SCHEMA(result=res['number_times_two']) |
| + |
| +def GenTests(api): |
| + yield ( |
| + api.test('basic') + |
| + api.properties(to_pass=3) + |
| + api.depend_on('bottom', {'number': 3}, {'number_times_two': 6}) |
|
Paweł Hajdan Jr.
2015/11/13 12:30:00
Can we test cases of invoking the same recipe with
martiniss
2015/11/13 23:19:03
Sure, that should work. Not testing that for now,
|
| + ) |