OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # Copyright 2012 The Swarming Authors. All rights reserved. | 3 # Copyright 2012 The LUCI Authors. All rights reserved. |
4 # Use of this source code is governed under the Apache License, Version 2.0 that | 4 # Use of this source code is governed by the Apache v2.0 license that can be |
5 # can be found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import StringIO | 7 import StringIO |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import sys | 10 import sys |
11 import unittest | 11 import unittest |
12 | 12 |
13 BASE_DIR = unicode(os.path.dirname(os.path.abspath(__file__))) | 13 BASE_DIR = unicode(os.path.dirname(os.path.abspath(__file__))) |
14 ROOT_DIR = os.path.dirname(BASE_DIR) | 14 ROOT_DIR = os.path.dirname(BASE_DIR) |
15 sys.path.insert(0, ROOT_DIR) | 15 sys.path.insert(0, ROOT_DIR) |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 } | 679 } |
680 self.assertContext(lines, ROOT_DIR, expected, False) | 680 self.assertContext(lines, ROOT_DIR, expected, False) |
681 | 681 |
682 | 682 |
683 if __name__ == '__main__': | 683 if __name__ == '__main__': |
684 logging.basicConfig( | 684 logging.basicConfig( |
685 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) | 685 level=logging.DEBUG if '-v' in sys.argv else logging.ERROR) |
686 if '-v' in sys.argv: | 686 if '-v' in sys.argv: |
687 unittest.TestCase.maxDiff = None | 687 unittest.TestCase.maxDiff = None |
688 unittest.main() | 688 unittest.main() |
OLD | NEW |