depot_tools: add test_api to infra_paths recipe module
BUG=chromium:605919 Review URL: https://codereview.chromium.org/1915113006 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300191 0039d316-1c4b-4281-b951-d872f2087c98changes/60/343160/1
parent
6d1266eef6
commit
cf48206332
@ -0,0 +1,16 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
from recipe_engine import recipe_test_api
|
||||
from recipe_engine.config_types import Path, NamedBasePath
|
||||
|
||||
class InfraPathsTestApi(recipe_test_api.RecipeTestApi):
|
||||
@recipe_test_api.mod_test_data
|
||||
@staticmethod
|
||||
def exists(*paths):
|
||||
assert all(isinstance(p, Path) for p in paths)
|
||||
return paths
|
||||
|
||||
def __getitem__(self, name):
|
||||
return Path(NamedBasePath(name))
|
Loading…
Reference in New Issue