| 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 by the Apache v2.0 license that can be | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
| 4 # 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(__file__))) |
| 14 sys.path.insert(0, ROOT_DIR) | 14 sys.path.insert(0, ROOT_DIR) |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 | 995 |
| 996 | 996 |
| 997 if __name__ == '__main__': | 997 if __name__ == '__main__': |
| 998 fix_encoding.fix_encoding() | 998 fix_encoding.fix_encoding() |
| 999 logging.basicConfig( | 999 logging.basicConfig( |
| 1000 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, | 1000 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, |
| 1001 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') | 1001 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') |
| 1002 if '-v' in sys.argv: | 1002 if '-v' in sys.argv: |
| 1003 unittest.TestCase.maxDiff = None | 1003 unittest.TestCase.maxDiff = None |
| 1004 unittest.main() | 1004 unittest.main() |
| OLD | NEW |