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

Unified Diff: recipe_modules/infra_paths/api.py

Issue 1917093004: depot_tools: only add mock infra_paths when test data is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/infra_paths/api.py
diff --git a/recipe_modules/infra_paths/api.py b/recipe_modules/infra_paths/api.py
index 1b902826f1138bce66defc1c86bc74f91d964835..7fd3e1ccd78d69a4d678e8703dfe17a89e65121b 100644
--- a/recipe_modules/infra_paths/api.py
+++ b/recipe_modules/infra_paths/api.py
@@ -29,9 +29,10 @@ class InfraPathsApi(recipe_api.RecipeApi):
else:
self.set_config('buildbot')
- for path in self._test_data.get('exists', []):
- assert isinstance(path.base, NamedBasePath)
- self.m.path.mock_add_paths(self[path.base.name].join(*path.pieces))
+ if self._test_data.enabled:
+ for path in self._test_data.get('exists', []):
+ assert isinstance(path.base, NamedBasePath)
+ self.m.path.mock_add_paths(self[path.base.name].join(*path.pieces))
def __getitem__(self, name):
self._lazy_set_config()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698