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

Side by Side Diff: recipe_engine/unittests/recipe_test_api_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 os
7 import sys
8 import unittest 6 import unittest
9 7
10 import test_env 8 import test_env
11 9
12 from recipe_engine import recipe_test_api 10 from recipe_engine import recipe_test_api
13 11
14 class EXC(Exception): 12 class EXC(Exception):
15 pass 13 pass
16 14
17 class TestExpectedException(unittest.TestCase): 15 class TestExpectedException(unittest.TestCase):
(...skipping 23 matching lines...) Expand all
41 39
42 def testDisabledTestData(self): 40 def testDisabledTestData(self):
43 """Disabled test data correctly re-raises all exceptions.""" 41 """Disabled test data correctly re-raises all exceptions."""
44 test_data = recipe_test_api.TestData() 42 test_data = recipe_test_api.TestData()
45 43
46 with test_data.should_raise_exception(EXC()) as should_raise: 44 with test_data.should_raise_exception(EXC()) as should_raise:
47 self.assertTrue(should_raise) 45 self.assertTrue(should_raise)
48 46
49 if __name__ == '__main__': 47 if __name__ == '__main__':
50 unittest.main() 48 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698