Chromium Code Reviews| Index: scripts/slave/recipes/annotated_run_test.py |
| diff --git a/scripts/slave/recipes/annotated_run_test.py b/scripts/slave/recipes/annotated_run_test.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..43907733a212bc3055de7bdd9ab9667bcd17a8dd |
| --- /dev/null |
| +++ b/scripts/slave/recipes/annotated_run_test.py |
| @@ -0,0 +1,40 @@ |
| +# Copyright 2014 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. |
| + |
| +"""Checks that properties get to recipes from annotated_run properly""" |
| + |
| +from recipe_engine.recipe_api import Property |
| + |
| +DEPS = [ |
| + 'recipe_engine/step', |
| + 'recipe_engine/properties', |
| +] |
| + |
| +PROPERTIES = { |
| + 'true_prop': Property(), |
| + 'num_prop': Property(), |
| + 'string_prop': Property(), |
| + 'dict_prop': Property(), |
|
iannucci
2015/09/16 22:26:49
list_prop!
|
| +} |
| + |
| +def RunSteps(api, true_prop, num_prop, string_prop, dict_prop): |
| + assert true_prop == True |
| + assert num_prop == 123 |
| + assert string_prop == '321' |
| + assert dict_prop == {'foo': 'bar'} |
| + |
| +def GenTests(api): |
| + yield api.test('basic') + api.properties( |
| + true_prop=True, |
| + num_prop=123, |
| + string_prop='321', |
| + dict_prop={'foo': 'bar'}) |
| + |
| + yield (api.test('type_error') + api.properties( |
| + true_prop=True, |
| + num_prop=123, |
| + string_prop=321, |
| + dict_prop={'foo': 'bar'}) + |
| + api.expect_exception('AssertionError')) |
| + |