OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Unit tests for gclient.py. | 6 """Unit tests for gclient.py. |
7 | 7 |
8 See gclient_smoketest.py for integration tests. | 8 See gclient_smoketest.py for integration tests. |
9 """ | 9 """ |
10 | 10 |
11 from __future__ import with_statement | |
12 import Queue | 11 import Queue |
13 import logging | 12 import logging |
14 import os | 13 import os |
15 import sys | 14 import sys |
16 import unittest | 15 import unittest |
17 | 16 |
18 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | 17 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
19 | 18 |
20 import gclient | 19 import gclient |
21 import gclient_utils | 20 import gclient_utils |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout) | 280 sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout) |
282 sys.stdout = gclient_utils.MakeFileAnnotated(sys.stdout, include_zero=True) | 281 sys.stdout = gclient_utils.MakeFileAnnotated(sys.stdout, include_zero=True) |
283 sys.stderr = gclient_utils.MakeFileAutoFlush(sys.stderr) | 282 sys.stderr = gclient_utils.MakeFileAutoFlush(sys.stderr) |
284 sys.stderr = gclient_utils.MakeFileAnnotated(sys.stderr, include_zero=True) | 283 sys.stderr = gclient_utils.MakeFileAnnotated(sys.stderr, include_zero=True) |
285 logging.basicConfig( | 284 logging.basicConfig( |
286 level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][ | 285 level=[logging.ERROR, logging.WARNING, logging.INFO, logging.DEBUG][ |
287 min(sys.argv.count('-v'), 3)], | 286 min(sys.argv.count('-v'), 3)], |
288 format='%(relativeCreated)4d %(levelname)5s %(module)13s(' | 287 format='%(relativeCreated)4d %(levelname)5s %(module)13s(' |
289 '%(lineno)d) %(message)s') | 288 '%(lineno)d) %(message)s') |
290 unittest.main() | 289 unittest.main() |
OLD | NEW |