blob: 5513a5043df1ea22713d108139c6afd540ea6d0e [file] [log] [blame]
# Copyright 2018 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.post_process import DoesNotRun, Filter, StatusFailure
DEPS = [
'recipe_engine/context',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/raw_io',
'recipe_engine/step',
'yaml',
]
def RunSteps(api):
api.yaml.parse_yaml(api.path['cleanup'].join('test.yaml'))
api.yaml._traverse_json(['a', 'b', {'c': 'd'}], 'c')
api.yaml._traverse_json({'a': 'b'}, 'a')
api.yaml._traverse_json({'a': 'b', 'e': {'c': 'd'}}, 'c')
api.yaml.retrieve_field(api.path['cleanup'].join('test.yaml'), 'a')
api.yaml.retrieve_field(api.path['cleanup'].join('test2.yaml'), 'a')
def GenTests(api):
yield api.test('example')
yield api.test('test retrieve field') + api.step_data(
'load yaml [CLEANUP]/test2.yaml', stdout=api.json.output({'a': 'b'}))