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

Unified Diff: recipe_engine/unittests/run_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 | « recipe_engine/stream.py ('k') | recipe_engine/unittests/stream_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/unittests/run_test.py
diff --git a/recipe_engine/unittests/run_test.py b/recipe_engine/unittests/run_test.py
index 582ddfdc600c4e1aedda611686dd08fa805d8d9d..64c6eb0dbbea2e98ede765bb5290c827222a9574 100755
--- a/recipe_engine/unittests/run_test.py
+++ b/recipe_engine/unittests/run_test.py
@@ -132,28 +132,28 @@ class RunTest(unittest.TestCase):
# self.assertEqual(zsh_output.decode('utf-8'), s + '\n')
def test_run_unconsumed(self):
- stream_engine = recipe_engine.stream.NoopStreamEngine()
- properties = {}
+ with recipe_engine.stream.NoopStreamEngine() as stream_engine:
+ properties = {}
- test_data = recipe_engine.recipe_test_api.TestData()
- test_data.expect_exception('SomeException')
+ test_data = recipe_engine.recipe_test_api.TestData()
+ test_data.expect_exception('SomeException')
- api = mock.Mock()
- api._engine = mock.Mock()
- api._engine.properties = properties
+ api = mock.Mock()
+ api._engine = mock.Mock()
+ api._engine.properties = properties
- engine = recipe_engine.run.RecipeEngine(
- recipe_engine.step_runner.SimulationStepRunner(
- stream_engine, test_data),
- properties,
- None)
+ engine = recipe_engine.run.RecipeEngine(
+ recipe_engine.step_runner.SimulationStepRunner(
+ stream_engine, test_data),
+ properties,
+ None)
- class FakeScript(object):
- def run(self, _, __):
- return None
+ class FakeScript(object):
+ def run(self, _, __):
+ return None
- with self.assertRaises(AssertionError):
- engine.run(FakeScript(), api)
+ with self.assertRaises(AssertionError):
+ engine.run(FakeScript(), api)
def test_subannotations(self):
proc = subprocess.Popen(
« no previous file with comments | « recipe_engine/stream.py ('k') | recipe_engine/unittests/stream_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698