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

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

Issue 2702313003: Remove unused imports and fix some other linter errors. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The LUCI Authors. All rights reserved. 2 # Copyright 2015 The LUCI Authors. All rights reserved.
3 # Use of this source code is governed under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 import cStringIO 6 import cStringIO
7 import os
8 import sys
9 import unittest 7 import unittest
10 8
11 import test_env 9 import test_env
12 10
13 from recipe_engine import recipe_api
14 from recipe_engine import stream 11 from recipe_engine import stream
15 12
16 class StreamTest(unittest.TestCase): 13 class StreamTest(unittest.TestCase):
17 def _example(self, engine): 14 def _example(self, engine):
18 foo = engine.make_step_stream('foo') 15 foo = engine.make_step_stream('foo')
19 foo.write_line('foo says hello to xyrself') 16 foo.write_line('foo says hello to xyrself')
20 17
21 bar = engine.make_step_stream('bar') 18 bar = engine.make_step_stream('bar')
22 foo.write_split('foo says hello to bar:\n hi bar') 19 foo.write_split('foo says hello to bar:\n hi bar')
23 bar.write_line('bar says hi, shyly') 20 bar.write_line('bar says hi, shyly')
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 156
160 def test_buildbot_status_constraint(self): 157 def test_buildbot_status_constraint(self):
161 with stream.StreamEngineInvariants() as engine: 158 with stream.StreamEngineInvariants() as engine:
162 foo = engine.make_step_stream('foo') 159 foo = engine.make_step_stream('foo')
163 foo.set_step_status('FAILURE') 160 foo.set_step_status('FAILURE')
164 with self.assertRaises(AssertionError): 161 with self.assertRaises(AssertionError):
165 foo.set_step_status('SUCCESS') 162 foo.set_step_status('SUCCESS')
166 163
167 if __name__ == '__main__': 164 if __name__ == '__main__':
168 unittest.main() 165 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698