Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: tests/checkout_test.py

Issue 8508017: Standardize the sys.path fix up and fix a few pylint warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Previous patchset was broken Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/breakpad_unittest.py ('k') | tests/fix_encoding_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 checkout.py.""" 6 """Unit tests for checkout.py."""
7 7
8 from __future__ import with_statement 8 from __future__ import with_statement
9 import logging 9 import logging
10 import os 10 import os
11 import shutil 11 import shutil
12 import sys 12 import sys
13 import unittest 13 import unittest
14 from xml.etree import ElementTree 14 from xml.etree import ElementTree
15 15
16 ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) 16 ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
17 BASE_DIR = os.path.join(ROOT_DIR, '..') 17 sys.path.insert(0, os.path.dirname(ROOT_DIR))
18 sys.path.insert(0, BASE_DIR)
19 18
20 import checkout 19 import checkout
21 import patch 20 import patch
22 import subprocess2 21 import subprocess2
23 from tests import fake_repos 22 from tests import fake_repos
24 from tests.patches_data import GIT, RAW 23 from tests.patches_data import GIT, RAW
25 24
26 25
27 # pass -v to enable it. 26 # pass -v to enable it.
28 DEBUGGING = False 27 DEBUGGING = False
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 if '-v' in sys.argv: 577 if '-v' in sys.argv:
579 DEBUGGING = True 578 DEBUGGING = True
580 logging.basicConfig( 579 logging.basicConfig(
581 level=logging.DEBUG, 580 level=logging.DEBUG,
582 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') 581 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
583 else: 582 else:
584 logging.basicConfig( 583 logging.basicConfig(
585 level=logging.ERROR, 584 level=logging.ERROR,
586 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') 585 format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s')
587 unittest.main() 586 unittest.main()
OLDNEW
« no previous file with comments | « tests/breakpad_unittest.py ('k') | tests/fix_encoding_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698