| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from recipe_engine import recipe_api | 5 from recipe_engine import recipe_api |
| 6 | 6 |
| 7 import textwrap | 7 import textwrap |
| 8 | 8 |
| 9 class PythonApi(recipe_api.RecipeApi): | 9 class PythonApi(recipe_api.RecipeApi): |
| 10 def __call__(self, name, script, args=None, unbuffered=True, **kwargs): | 10 def __call__(self, name, script, args=None, unbuffered=True, **kwargs): |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 else: | 46 else: |
| 47 self.m.step.active_result.presentation.step_text = text | 47 self.m.step.active_result.presentation.step_text = text |
| 48 | 48 |
| 49 def succeeding_step(self, name, text, as_log=None): | 49 def succeeding_step(self, name, text, as_log=None): |
| 50 """Return a succeeding step (correctly recognized in expectations).""" | 50 """Return a succeeding step (correctly recognized in expectations).""" |
| 51 return self.result_step(name, text, 0, as_log=as_log) | 51 return self.result_step(name, text, 0, as_log=as_log) |
| 52 | 52 |
| 53 def failing_step(self, name, text, as_log=None): | 53 def failing_step(self, name, text, as_log=None): |
| 54 """Return a failing step (correctly recognized in expectations).""" | 54 """Return a failing step (correctly recognized in expectations).""" |
| 55 return self.result_step(name, text, 1, as_log=as_log) | 55 return self.result_step(name, text, 1, as_log=as_log) |
| OLD | NEW |