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

Unified Diff: recipe_engine/unittests/loader_test.py

Issue 2864803003: Minor loader improvements. (Closed)
Patch Set: fix tests Created 3 years, 7 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 | « recipe_engine/loader.py ('k') | unittests/errors_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/unittests/loader_test.py
diff --git a/recipe_engine/unittests/loader_test.py b/recipe_engine/unittests/loader_test.py
index ecc970318ba3c9e5bbc20718d40dff7c2decd6a2..29265f1ee32535f8b93e0ce880c06797ed8b2fa2 100755
--- a/recipe_engine/unittests/loader_test.py
+++ b/recipe_engine/unittests/loader_test.py
@@ -13,9 +13,12 @@ import mock
class TestRecipeScript(unittest.TestCase):
def testReturnSchemaHasValidClass(self):
- with self.assertRaises(ValueError):
- loader.RecipeScript('fake_recipe',
- {'RETURN_SCHEMA': 3}, 'fake_package', 'some/path')
+ with self.assertRaises(loader.MalformedRecipeError):
+ loader.RecipeScript('fake_recipe', {
+ 'GenTests': lambda api: None,
+ 'RunSteps': lambda api: None,
+ 'RETURN_SCHEMA': 3,
+ }, 'fake_package', 'some/path')
def testRunChecksReturnType(self):
sentinel = object()
@@ -29,7 +32,8 @@ class TestRecipeScript(unittest.TestCase):
script = loader.RecipeScript(
'fake_recipe', {
'RETURN_SCHEMA': config.ConfigGroupSchema(a=config.Single(int)),
- 'RunSteps': None,
+ 'RunSteps': lambda api: None,
+ 'GenTests': lambda api: None,
}, 'fake_package', 'some/path')
loader.invoke_with_properties = lambda *args, **kwargs: FakeReturn()
« no previous file with comments | « recipe_engine/loader.py ('k') | unittests/errors_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698