Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(957)

Unified Diff: recipe_engine/simulation_test.py

Issue 2052543003: Emit CURRENT_TIMESTAMP annotation (Closed) Base URL: git@github.com:luci/recipes-py.git@master
Patch Set: nit Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | recipe_engine/stream.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/simulation_test.py
diff --git a/recipe_engine/simulation_test.py b/recipe_engine/simulation_test.py
index 4dd69e92d389f1cdf2b1ae35d9fbfd755d60725e..ef1d28cb512df826c732bfea9ea763dec47e6890 100644
--- a/recipe_engine/simulation_test.py
+++ b/recipe_engine/simulation_test.py
@@ -24,19 +24,19 @@ def RunRecipe(test_data):
from . import stream
config_types.ResetTostringFns()
- stream_engine = stream.StreamEngineInvariants()
- step_runner = step_runner.SimulationStepRunner(stream_engine, test_data)
+ with stream.StreamEngineInvariants() as stream_engine:
+ step_runner = step_runner.SimulationStepRunner(stream_engine, test_data)
- engine = run.RecipeEngine(step_runner, test_data.properties, _UNIVERSE)
- recipe_script = _UNIVERSE.load_recipe(test_data.properties['recipe'])
- api = loader.create_recipe_api(recipe_script.LOADED_DEPS, engine, test_data)
- result = engine.run(recipe_script, api)
+ engine = run.RecipeEngine(step_runner, test_data.properties, _UNIVERSE)
+ recipe_script = _UNIVERSE.load_recipe(test_data.properties['recipe'])
+ api = loader.create_recipe_api(recipe_script.LOADED_DEPS, engine, test_data)
+ result = engine.run(recipe_script, api)
- # Don't include tracebacks in expectations because they are too sensitive to
- # change.
- result.result.pop('traceback', None)
+ # Don't include tracebacks in expectations because they are too sensitive to
+ # change.
+ result.result.pop('traceback', None)
- return expect_tests.Result(step_runner.steps_ran + [result.result])
+ return expect_tests.Result(step_runner.steps_ran + [result.result])
def test_gen_coverage():
« no previous file with comments | « no previous file | recipe_engine/stream.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698