| OLD | NEW |
| 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 Loading... |
| 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: |
| OLD | NEW |