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

Side by Side Diff: scripts/slave/recipe_modules/path/test_api.py

Issue 1101673005: Extract functions from path recipe module so that step can depend on it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 from slave import recipe_test_api 1 from slave import recipe_test_api
2 from slave.recipe_config_types import Path, NamedBasePath 2 from slave.recipe_config_types import Path, NamedBasePath
3 3
4 class PathTestApi(recipe_test_api.RecipeTestApi): 4 class PathTestApi(recipe_test_api.RecipeTestApi):
5 @recipe_test_api.mod_test_data 5 @recipe_test_api.mod_test_data
6 @staticmethod 6 @staticmethod
7 def exists(*paths): 7 def exists(*paths):
8 assert all(isinstance(p, Path) for p in paths) 8 assert all(isinstance(p, Path) for p in paths)
9 return paths 9 return paths
10 10
11 def __getitem__(self, name): 11 def __getitem__(self, name):
12 return Path(NamedBasePath(name)) 12 return Path(NamedBasePath(name))
13
14 def listdir(self, files):
15 def listdir_callback():
16 return self.m.json.output(files)
17 return listdir_callback
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/path/example.expected/win.json ('k') | scripts/slave/recipe_modules/pgo/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698