Chromium Code Reviews| 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 """Checks that properties get to recipes from annotated_run properly""" | |
| 6 | |
| 7 from recipe_engine.recipe_api import Property | |
| 8 | |
| 9 DEPS = [ | |
| 10 'recipe_engine/step', | |
| 11 'recipe_engine/properties', | |
| 12 ] | |
| 13 | |
| 14 PROPERTIES = { | |
| 15 'true_prop': Property(), | |
| 16 'num_prop': Property(), | |
| 17 'string_prop': Property(), | |
| 18 'dict_prop': Property(), | |
|
iannucci
2015/09/16 22:26:49
list_prop!
| |
| 19 } | |
| 20 | |
| 21 def RunSteps(api, true_prop, num_prop, string_prop, dict_prop): | |
| 22 assert true_prop == True | |
| 23 assert num_prop == 123 | |
| 24 assert string_prop == '321' | |
| 25 assert dict_prop == {'foo': 'bar'} | |
| 26 | |
| 27 def GenTests(api): | |
| 28 yield api.test('basic') + api.properties( | |
| 29 true_prop=True, | |
| 30 num_prop=123, | |
| 31 string_prop='321', | |
| 32 dict_prop={'foo': 'bar'}) | |
| 33 | |
| 34 yield (api.test('type_error') + api.properties( | |
| 35 true_prop=True, | |
| 36 num_prop=123, | |
| 37 string_prop=321, | |
| 38 dict_prop={'foo': 'bar'}) + | |
| 39 api.expect_exception('AssertionError')) | |
| 40 | |
| OLD | NEW |