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

Side by Side Diff: tests/gclient_test.py

Issue 562031: Fix licensing headers and move most third party code to third_party/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 10 months 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/python 1 #!/usr/bin/python
2 # 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Copyright 2008-2009 Google Inc. All Rights Reserved. 3 # Use of this source code is governed by a BSD-style license that can be
4 # 4 # found in the LICENSE file.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 5
17 """Unit tests for gclient.py.""" 6 """Unit tests for gclient.py."""
18 7
19 __author__ = 'stephen5.ng@gmail.com (Stephen Ng)' 8 # Fixes include path.
20 9 from super_mox import mox, IsOneOf, SuperMoxTestBase
21 import __builtin__
22 import StringIO
23 10
24 import gclient 11 import gclient
25 from super_mox import mox, IsOneOf, SuperMoxTestBase
26 12
27 13
28 class BaseTestCase(SuperMoxTestBase): 14 class BaseTestCase(SuperMoxTestBase):
29 # Like unittest's assertRaises, but checks for Gclient.Error. 15 # Like unittest's assertRaises, but checks for Gclient.Error.
30 def assertRaisesError(self, msg, fn, *args, **kwargs): 16 def assertRaisesError(self, msg, fn, *args, **kwargs):
31 try: 17 try:
32 fn(*args, **kwargs) 18 fn(*args, **kwargs)
33 except gclient.gclient_utils.Error, e: 19 except gclient.gclient_utils.Error, e:
34 self.assertEquals(e.args[0], msg) 20 self.assertEquals(e.args[0], msg)
35 else: 21 else:
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 pass 1050 pass
1065 def test_VarImpl(self): 1051 def test_VarImpl(self):
1066 pass 1052 pass
1067 1053
1068 1054
1069 if __name__ == '__main__': 1055 if __name__ == '__main__':
1070 import unittest 1056 import unittest
1071 unittest.main() 1057 unittest.main()
1072 1058
1073 # vim: ts=2:sw=2:tw=80:et: 1059 # vim: ts=2:sw=2:tw=80:et:
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698