OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 before super_mox to keep valid references. | 10 # Import before super_mox to keep valid references. |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 self.assertEquals(svn_scm.GetUsableRev(1, options), 1) | 797 self.assertEquals(svn_scm.GetUsableRev(1, options), 1) |
798 # With an SVN checkout, a fake or unknown rev should raise an excpetion. | 798 # With an SVN checkout, a fake or unknown rev should raise an excpetion. |
799 self.assertRaises(gclient_scm.gclient_utils.Error, | 799 self.assertRaises(gclient_scm.gclient_utils.Error, |
800 svn_scm.GetUsableRev, 'fake', options) | 800 svn_scm.GetUsableRev, 'fake', options) |
801 | 801 |
802 class BaseGitWrapperTestCase(GCBaseTestCase, StdoutCheck, TestCaseUtils, | 802 class BaseGitWrapperTestCase(GCBaseTestCase, StdoutCheck, TestCaseUtils, |
803 unittest.TestCase): | 803 unittest.TestCase): |
804 """This class doesn't use pymox.""" | 804 """This class doesn't use pymox.""" |
805 class OptionsObject(object): | 805 class OptionsObject(object): |
806 def __init__(self, verbose=False, revision=None): | 806 def __init__(self, verbose=False, revision=None): |
| 807 self.auto_rebase = False |
807 self.verbose = verbose | 808 self.verbose = verbose |
808 self.revision = revision | 809 self.revision = revision |
809 self.manually_grab_svn_rev = True | 810 self.manually_grab_svn_rev = True |
810 self.deps_os = None | 811 self.deps_os = None |
811 self.force = False | 812 self.force = False |
812 self.reset = False | 813 self.reset = False |
813 self.nohooks = False | 814 self.nohooks = False |
814 self.no_history = False | 815 self.no_history = False |
815 self.upstream = False | 816 self.upstream = False |
816 self.cache_dir = None | 817 self.cache_dir = None |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 | 1619 |
1619 if __name__ == '__main__': | 1620 if __name__ == '__main__': |
1620 level = logging.DEBUG if '-v' in sys.argv else logging.FATAL | 1621 level = logging.DEBUG if '-v' in sys.argv else logging.FATAL |
1621 logging.basicConfig( | 1622 logging.basicConfig( |
1622 level=level, | 1623 level=level, |
1623 format='%(asctime).19s %(levelname)s %(filename)s:' | 1624 format='%(asctime).19s %(levelname)s %(filename)s:' |
1624 '%(lineno)s %(message)s') | 1625 '%(lineno)s %(message)s') |
1625 unittest.main() | 1626 unittest.main() |
1626 | 1627 |
1627 # vim: ts=2:sw=2:tw=80:et: | 1628 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |