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

Side by Side Diff: scripts/slave/unittests/get_swarm_results_test.py

Issue 23176003: Create proper wrapper scripts to decouple from swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Had forgot to append _shim to one comment Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « scripts/slave/swarming/trigger_swarm_shim.py ('k') | no next file » | 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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 logging 6 import logging
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 import test_env # pylint: disable=W0403,W0611 10 import test_env # pylint: disable=W0403,W0611
(...skipping 10 matching lines...) Expand all
21 raise NotImplementedError() 21 raise NotImplementedError()
22 22
23 @staticmethod 23 @staticmethod
24 def get_test_keys(url, test_name): 24 def get_test_keys(url, test_name):
25 raise NotImplementedError() 25 raise NotImplementedError()
26 26
27 27
28 sys.modules['swarm_get_results'] = FakeSwarmGetResultsModule() 28 sys.modules['swarm_get_results'] = FakeSwarmGetResultsModule()
29 29
30 30
31 import slave.swarming.get_swarm_results as swarm_results 31 import slave.swarming.get_swarm_results_shim as swarm_results
32 32
33 33
34 RUN_TEST_OUTPUT = ( 34 RUN_TEST_OUTPUT = (
35 """[----------] 2 tests from StaticCookiePolicyTest 35 """[----------] 2 tests from StaticCookiePolicyTest
36 [ RUN ] StaticCookiePolicyTest.AllowAllCookiesTest 36 [ RUN ] StaticCookiePolicyTest.AllowAllCookiesTest
37 [ OK ] StaticCookiePolicyTest.AllowAllCookiesTest (0 ms) 37 [ OK ] StaticCookiePolicyTest.AllowAllCookiesTest (0 ms)
38 [ RUN ] StaticCookiePolicyTest.BlockAllCookiesTest 38 [ RUN ] StaticCookiePolicyTest.BlockAllCookiesTest
39 [ OK ] StaticCookiePolicyTest.BlockAllCookiesTest (0 ms) 39 [ OK ] StaticCookiePolicyTest.BlockAllCookiesTest (0 ms)
40 [----------] 2 tests from StaticCookiePolicyTest (0 ms total) 40 [----------] 2 tests from StaticCookiePolicyTest (0 ms total)
41 41
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 actual = swarm_results.gen_summary_output([], 0, [1]) 134 actual = swarm_results.gen_summary_output([], 0, [1])
135 self.assertEqual((expected, 1), actual) 135 self.assertEqual((expected, 1), actual)
136 136
137 137
138 if __name__ == '__main__': 138 if __name__ == '__main__':
139 logging.basicConfig( 139 logging.basicConfig(
140 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) 140 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR)
141 if '-v' in sys.argv: 141 if '-v' in sys.argv:
142 unittest.TestCase.maxDiff = None 142 unittest.TestCase.maxDiff = None
143 unittest.main() 143 unittest.main()
OLDNEW
« no previous file with comments | « scripts/slave/swarming/trigger_swarm_shim.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698