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

Side by Side Diff: tests/scm_unittest.py

Issue 6690034: Add more python 2.5 compatibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Don't force python 2.5 anymore (to be done in a separate change) Created 9 years, 8 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/env python
2 # Copyright (c) 2010 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 scm.py.""" 6 """Unit tests for scm.py."""
7 7
8 # pylint: disable=E1101,W0403 8 # pylint: disable=E1101,W0403
9 from __future__ import with_statement
10 import logging
11 import sys
12 import unittest
9 13
10 # Fixes include path. 14 # Fixes include path.
11 from super_mox import SuperMoxTestBase 15 from super_mox import SuperMoxTestBase
12 16
13 import fake_repos 17 import fake_repos
14 import scm 18 import scm
15 19
16 20
17 class BaseTestCase(SuperMoxTestBase): 21 class BaseTestCase(SuperMoxTestBase):
18 # Like unittest's assertRaises, but checks for Gclient.Error. 22 # Like unittest's assertRaises, but checks for Gclient.Error.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 322
319 scm.SVN.Revert(self.svn_root) 323 scm.SVN.Revert(self.svn_root)
320 self._capture(['update', '--revision', 'base']) 324 self._capture(['update', '--revision', 'base'])
321 325
322 self.assertTree(self.tree, self.svn_root) 326 self.assertTree(self.tree, self.svn_root)
323 # Asserting the tree is not sufficient, svn status must come out clear too. 327 # Asserting the tree is not sufficient, svn status must come out clear too.
324 self.assertEquals('', self._capture(['status'])) 328 self.assertEquals('', self._capture(['status']))
325 329
326 330
327 if __name__ == '__main__': 331 if __name__ == '__main__':
328 import unittest 332 if '-v' in sys.argv:
333 logging.basicConfig(level=logging.DEBUG)
329 unittest.main() 334 unittest.main()
330 335
331 # vim: ts=2:sw=2:tw=80:et: 336 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« tests/owners_unittest.py ('K') | « tests/presubmit_unittest.py ('k') | tests/super_mox.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698