OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from infra.libs.infra_types import thaw |
| 6 from recipe_engine.recipe_api import Property |
| 7 |
| 8 DEPS = ['properties', 'step'] |
| 9 |
| 10 PROPERTIES = { |
| 11 'test_prop': Property(), |
| 12 } |
| 13 |
| 14 def RunSteps(api, test_prop): |
| 15 api.step('echo', ['echo'] + [repr(test_prop)]) |
| 16 api.step('echo all', ['echo'] + [repr(api.properties.thaw())]) |
| 17 |
| 18 def GenTests(api): |
| 19 yield api.test('basic') + api.properties( |
| 20 test_prop={'key': 'value'}) |
| 21 yield api.test('lists') + api.properties( |
| 22 test_prop={'key': ['value', ['value']]}) |
| 23 yield api.test('dicts') + api.properties( |
| 24 test_prop={'key': {'key': 'value', 'other_key': {'key': 'value'}}}) |
| 25 |
| 26 yield ( |
| 27 api.test('exception') + |
| 28 api.expect_exception('ValueError') |
| 29 ) |
| 30 |
OLD | NEW |