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

Side by Side Diff: recipe_engine/unittests/run_test.py

Issue 1421843006: Add simple depends_on API. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Remove old expectation, move tests to their own folder. Created 5 years 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 unified diff | Download patch
« no previous file with comments | « recipe_engine/unittests/loader_test.py ('k') | recipes.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import unittest 9 import unittest
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 properties = {} 64 properties = {}
65 65
66 test_data = mock.Mock() 66 test_data = mock.Mock()
67 test_data.enabled = True 67 test_data.enabled = True
68 test_data.consumed = False 68 test_data.consumed = False
69 69
70 api = mock.Mock() 70 api = mock.Mock()
71 api._engine = mock.Mock() 71 api._engine = mock.Mock()
72 api._engine.properties = properties 72 api._engine.properties = properties
73 73
74 engine = recipe_engine.run.RecipeEngine(stream, properties, test_data) 74 engine = recipe_engine.run.RecipeEngine(stream, properties, test_data, None)
75 75
76 class FakeScript(object): 76 class FakeScript(object):
77 def run(self, _, __): 77 def run(self, _, __):
78 return None 78 return None
79 79
80 with mock.patch('recipe_engine.run.RecipeEngine._emit_results'): 80 with mock.patch('recipe_engine.run.RecipeEngine._emit_results'):
81 with self.assertRaises(AssertionError): 81 with self.assertRaises(AssertionError):
82 engine.run(FakeScript(), api) 82 engine.run(FakeScript(), api)
83 83
84 84
85
86 if __name__ == '__main__': 85 if __name__ == '__main__':
87 unittest.TestCase.maxDiff = None 86 unittest.TestCase.maxDiff = None
88 unittest.main() 87 unittest.main()
OLDNEW
« no previous file with comments | « recipe_engine/unittests/loader_test.py ('k') | recipes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698