Chromium Code Reviews| Index: recipe_engine/config_types.py |
| diff --git a/recipe_engine/config_types.py b/recipe_engine/config_types.py |
| index c2797f6a0801313c470a7b17284d502a7f688ece..9e1878fc8515b45028ecce09f0a6aa0f670da4b9 100644 |
| --- a/recipe_engine/config_types.py |
| +++ b/recipe_engine/config_types.py |
| @@ -116,6 +116,17 @@ class ModuleBasePath(BasePath, namedtuple('ModuleBasePath', 'module')): |
| return 'RECIPE_MODULE[%s]' % re.sub('\.', '::', name) |
| +class RecipeScriptBasePath( |
| + BasePath, namedtuple('RecipeScriptBasePath', 'recipe_name script_path')): |
| + def resolve(self, test_enabled): |
| + if test_enabled: |
| + return repr(self) |
| + return os.path.dirname(self.script_path) # pragma: no cover |
| + |
| + def __repr__(self): |
| + return 'RECIPE[%s].resources' % self.recipe_name |
|
nodir
2016/11/18 22:42:25
shouldn't this be RECIPE_RESOURCES[%s] ?
what is R
iannucci
2016/11/19 00:00:57
Discussed offline, don't see a better alternative
|
| + |
| + |
| class PackageRepoBasePath( |
| BasePath, namedtuple('PackageRepoBasePath', 'package')): |
| def resolve(self, test_enabled): |