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

Side by Side Diff: tests/gclient_scm_test.py

Issue 8508015: Create a new depot_tools_testing_lib to move utility modules there (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: rebase against 8508017 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
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 gclient_scm.py.""" 6 """Unit tests for gclient_scm.py."""
7 7
8 # pylint: disable=E1103 8 # pylint: disable=E1103
9 9
10 import logging 10 import logging
11 import os 11 import os
12 # Import before super_mox to keep valid references. 12 # Import before super_mox to keep valid references.
13 from os import rename 13 from os import rename
14 from shutil import rmtree 14 from shutil import rmtree
15 from subprocess import Popen, PIPE, STDOUT 15 from subprocess import Popen, PIPE, STDOUT
16 import sys 16 import sys
17 import tempfile 17 import tempfile
18 import unittest 18 import unittest
19 import __builtin__ 19 import __builtin__
20 20
21 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 21 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
22 22
23 from super_mox import mox, StdoutCheck, SuperMoxTestBase 23 from depot_tools_testing_lib.super_mox import mox, StdoutCheck, SuperMoxTestBase
24 from super_mox import TestCaseUtils 24 from depot_tools_testing_lib.super_mox import TestCaseUtils
25 25
26 import gclient_scm 26 import gclient_scm
27 import subprocess2 27 import subprocess2
28 28
29 # Shortcut since this function is used often 29 # Shortcut since this function is used often
30 join = gclient_scm.os.path.join 30 join = gclient_scm.os.path.join
31 31
32 32
33 class GCBaseTestCase(object): 33 class GCBaseTestCase(object):
34 def assertRaisesError(self, msg, fn, *args, **kwargs): 34 def assertRaisesError(self, msg, fn, *args, **kwargs):
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 965
966 if __name__ == '__main__': 966 if __name__ == '__main__':
967 if '-v' in sys.argv: 967 if '-v' in sys.argv:
968 logging.basicConfig( 968 logging.basicConfig(
969 level=logging.DEBUG, 969 level=logging.DEBUG,
970 format='%(asctime).19s %(levelname)s %(filename)s:' 970 format='%(asctime).19s %(levelname)s %(filename)s:'
971 '%(lineno)s %(message)s') 971 '%(lineno)s %(message)s')
972 unittest.main() 972 unittest.main()
973 973
974 # vim: ts=2:sw=2:tw=80:et: 974 # vim: ts=2:sw=2:tw=80:et:
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698