| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The LUCI Authors. All rights reserved. | 2 # Copyright 2013 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 logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 import unittest | 10 import unittest |
| 11 | 11 |
| 12 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | 12 BASE_DIR = os.path.dirname(os.path.abspath( |
| 13 __file__.decode(sys.getfilesystemencoding()))) |
| 13 | 14 |
| 14 ISOLATE_SERVER = 'https://isolateserver.appspot.com/' | 15 ISOLATE_SERVER = 'https://isolateserver.appspot.com/' |
| 15 SWARMING_SERVER = 'https://chromium-swarm.appspot.com/' | 16 SWARMING_SERVER = 'https://chromium-swarm.appspot.com/' |
| 16 | 17 |
| 17 | 18 |
| 18 class TestSwarm(unittest.TestCase): | 19 class TestSwarm(unittest.TestCase): |
| 19 def test_example(self): | 20 def test_example(self): |
| 20 # pylint: disable=W0101 | 21 # pylint: disable=W0101 |
| 21 # A user should be able to trigger a swarm job and return results. | 22 # A user should be able to trigger a swarm job and return results. |
| 22 cmd = [ | 23 cmd = [ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 37 logging.debug(out) | 38 logging.debug(out) |
| 38 self.assertEqual(0, p.returncode, out) | 39 self.assertEqual(0, p.returncode, out) |
| 39 | 40 |
| 40 | 41 |
| 41 if __name__ == '__main__': | 42 if __name__ == '__main__': |
| 42 logging.basicConfig( | 43 logging.basicConfig( |
| 43 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) | 44 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) |
| 44 if '-v' in sys.argv: | 45 if '-v' in sys.argv: |
| 45 unittest.TestCase.maxDiff = None | 46 unittest.TestCase.maxDiff = None |
| 46 unittest.main() | 47 unittest.main() |
| OLD | NEW |