| 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 # pylint: disable=R0201 | 6 # pylint: disable=R0201 |
| 7 | 7 |
| 8 import StringIO | 8 import StringIO |
| 9 import base64 | 9 import base64 |
| 10 import functools | 10 import functools |
| 11 import json | 11 import json |
| 12 import logging | 12 import logging |
| 13 import os | 13 import os |
| 14 import sys | 14 import sys |
| 15 import tempfile | 15 import tempfile |
| 16 import unittest | 16 import unittest |
| 17 | 17 |
| 18 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 18 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath( |
| 19 __file__.decode(sys.getfilesystemencoding())))) |
| 19 sys.path.insert(0, ROOT_DIR) | 20 sys.path.insert(0, ROOT_DIR) |
| 20 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) | 21 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) |
| 21 | 22 |
| 22 import cipd | 23 import cipd |
| 23 import isolated_format | 24 import isolated_format |
| 24 import isolateserver | 25 import isolateserver |
| 25 import run_isolated | 26 import run_isolated |
| 26 from depot_tools import auto_stub | 27 from depot_tools import auto_stub |
| 27 from depot_tools import fix_encoding | 28 from depot_tools import fix_encoding |
| 28 from utils import file_path | 29 from utils import file_path |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 self.assertEqual(expected, actual) | 634 self.assertEqual(expected, actual) |
| 634 | 635 |
| 635 | 636 |
| 636 if __name__ == '__main__': | 637 if __name__ == '__main__': |
| 637 fix_encoding.fix_encoding() | 638 fix_encoding.fix_encoding() |
| 638 if '-v' in sys.argv: | 639 if '-v' in sys.argv: |
| 639 unittest.TestCase.maxDiff = None | 640 unittest.TestCase.maxDiff = None |
| 640 logging.basicConfig( | 641 logging.basicConfig( |
| 641 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) | 642 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) |
| 642 unittest.main() | 643 unittest.main() |
| OLD | NEW |