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

Unified Diff: recipe_modules/json/test_api.py

Issue 2768883004: json: Improve error handling and adding ability to limit log output.
Patch Set: Created 3 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
Index: recipe_modules/json/test_api.py
diff --git a/recipe_modules/json/test_api.py b/recipe_modules/json/test_api.py
index e260238a82aaaac0d8235923dcc271c1fd8fc996..f15b264c6ac0cb44cfa5987e733a05a4992ce14e 100644
--- a/recipe_modules/json/test_api.py
+++ b/recipe_modules/json/test_api.py
@@ -26,6 +26,14 @@ class JsonTestApi(recipe_test_api.RecipeTestApi):
ret.placeholder_data[(self._module.NAME, 'output', name)] = placeholder_data
return ret
+ def not_found(self, retcode=None, name=None):
+ """Can be used to have the json.output file be missing."""
+ ret = recipe_test_api.StepTestData()
+ ret.retcode=retcode
+ # FIXME: How do I get None into the data?
Paweł Hajdan Jr. 2017/03/23 12:22:12 What happens if you just use None below instead of
iannucci 2017/03/23 19:44:13 That's what I would expect as well... however I wo
+ ret.placeholder_data[(self._module.NAME, 'output', name)] = ''
+ return ret
+
def output_stream(self, data, stream='stdout', retcode=None, name=None):
assert stream in ('stdout', 'stderr')
ret = recipe_test_api.StepTestData()
« recipe_modules/json/api.py ('K') | « recipe_modules/json/example.expected/basic.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698