| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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() |
| OLD | NEW |