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 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 self.jobs = 1 | 1057 self.jobs = 1 |
1058 | 1058 |
1059 def Options(self, *args, **kwargs): | 1059 def Options(self, *args, **kwargs): |
1060 return self.OptionsObject(*args, **kwargs) | 1060 return self.OptionsObject(*args, **kwargs) |
1061 | 1061 |
1062 def setUp(self): | 1062 def setUp(self): |
1063 BaseTestCase.setUp(self) | 1063 BaseTestCase.setUp(self) |
1064 self.fake_hash_1 = 't0ta11yf4k3' | 1064 self.fake_hash_1 = 't0ta11yf4k3' |
1065 self.fake_hash_2 = '3v3nf4k3r' | 1065 self.fake_hash_2 = '3v3nf4k3r' |
1066 self.url = 'git://foo' | 1066 self.url = 'git://foo' |
1067 self.root_dir = '/tmp' | 1067 self.root_dir = '/tmp' if sys.platform != 'win32' else 't:\\tmp' |
1068 self.relpath = 'fake' | 1068 self.relpath = 'fake' |
1069 self.base_path = os.path.join(self.root_dir, self.relpath) | 1069 self.base_path = os.path.join(self.root_dir, self.relpath) |
1070 | 1070 |
1071 def tearDown(self): | 1071 def tearDown(self): |
1072 BaseTestCase.tearDown(self) | 1072 BaseTestCase.tearDown(self) |
1073 | 1073 |
1074 def testGetUsableRevGit(self): | 1074 def testGetUsableRevGit(self): |
1075 # pylint: disable=E1101 | 1075 # pylint: disable=E1101 |
1076 options = self.Options(verbose=True) | 1076 options = self.Options(verbose=True) |
1077 | 1077 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 | 1189 |
1190 if __name__ == '__main__': | 1190 if __name__ == '__main__': |
1191 if '-v' in sys.argv: | 1191 if '-v' in sys.argv: |
1192 logging.basicConfig( | 1192 logging.basicConfig( |
1193 level=logging.DEBUG, | 1193 level=logging.DEBUG, |
1194 format='%(asctime).19s %(levelname)s %(filename)s:' | 1194 format='%(asctime).19s %(levelname)s %(filename)s:' |
1195 '%(lineno)s %(message)s') | 1195 '%(lineno)s %(message)s') |
1196 unittest.main() | 1196 unittest.main() |
1197 | 1197 |
1198 # vim: ts=2:sw=2:tw=80:et: | 1198 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |