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

Unified Diff: recipes/bottom.py

Issue 1421843006: Add simple depends_on API. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Created 5 years, 1 month 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
Index: recipes/bottom.py
diff --git a/recipes/bottom.py b/recipes/bottom.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d90218ab88e8e4e05f6c2d522147ebc375420fb
--- /dev/null
+++ b/recipes/bottom.py
@@ -0,0 +1,24 @@
+from recipe_engine.recipe_api import Property
+from recipe_engine import config
+
+DEPS = [
+ 'recipe_engine/properties',
+]
+
+PROPERTIES = {
+ 'number': Property(kind=int),
+}
+
+RETURN_SCHEMA = config.ReturnSchema(
+ result=config.Single(int),
+)
+
+def RunSteps(api, number):
+ result = number * 2
+ return RETURN_SCHEMA(result=result)
+
+def GenTests(api):
+ yield (
+ api.test('basic') +
+ api.properties(number=3)
+ )
« no previous file with comments | « recipes.py ('k') | recipes/bottom.expected/basic.json » ('j') | recipes/top.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698