| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The LUCI Authors. All rights reserved. | 2 # Copyright 2014 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 cStringIO | 6 import cStringIO |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 import tempfile | 10 import tempfile |
| 11 import unittest | 11 import unittest |
| 12 | 12 |
| 13 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 13 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath( |
| 14 __file__.decode(sys.getfilesystemencoding())))) |
| 14 sys.path.insert(0, ROOT_DIR) | 15 sys.path.insert(0, ROOT_DIR) |
| 15 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) | 16 sys.path.insert(0, os.path.join(ROOT_DIR, 'third_party')) |
| 16 | 17 |
| 17 import isolate_format | 18 import isolate_format |
| 18 from depot_tools import auto_stub | 19 from depot_tools import auto_stub |
| 19 from depot_tools import fix_encoding | 20 from depot_tools import fix_encoding |
| 20 from utils import file_path | 21 from utils import file_path |
| 21 | 22 |
| 22 | 23 |
| 23 # Access to a protected member XXX of a client class | 24 # Access to a protected member XXX of a client class |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 | 996 |
| 996 | 997 |
| 997 if __name__ == '__main__': | 998 if __name__ == '__main__': |
| 998 fix_encoding.fix_encoding() | 999 fix_encoding.fix_encoding() |
| 999 logging.basicConfig( | 1000 logging.basicConfig( |
| 1000 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, | 1001 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, |
| 1001 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') | 1002 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') |
| 1002 if '-v' in sys.argv: | 1003 if '-v' in sys.argv: |
| 1003 unittest.TestCase.maxDiff = None | 1004 unittest.TestCase.maxDiff = None |
| 1004 unittest.main() | 1005 unittest.main() |
| OLD | NEW |