| OLD | NEW | 
|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python | 
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 # Import before super_mox to keep valid references. | 8 # Import before super_mox to keep valid references. | 
| 9 from os import rename | 9 from os import rename | 
| 10 from shutil import rmtree | 10 from shutil import rmtree | 
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 372     self.base_path = gclient_scm.os.path.join(self.root_dir, self.relpath) | 372     self.base_path = gclient_scm.os.path.join(self.root_dir, self.relpath) | 
| 373     self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path) | 373     self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path) | 
| 374     SuperMoxBaseTestBase.setUp(self) | 374     SuperMoxBaseTestBase.setUp(self) | 
| 375 | 375 | 
| 376   def tearDown(self): | 376   def tearDown(self): | 
| 377     SuperMoxBaseTestBase.tearDown(self) | 377     SuperMoxBaseTestBase.tearDown(self) | 
| 378     rmtree(self.root_dir) | 378     rmtree(self.root_dir) | 
| 379 | 379 | 
| 380   def testDir(self): | 380   def testDir(self): | 
| 381     members = [ | 381     members = [ | 
| 382         'COMMAND', 'Capture', 'CaptureStatus', 'FetchUpstreamTuple', | 382         'COMMAND', 'AssertVersion', 'Capture', 'CaptureStatus', | 
|  | 383         'FetchUpstreamTuple', | 
| 383         'FullUrlForRelativeUrl', 'GenerateDiff', 'GetBranch', 'GetBranchRef', | 384         'FullUrlForRelativeUrl', 'GenerateDiff', 'GetBranch', 'GetBranchRef', | 
| 384         'GetCheckoutRoot', 'GetDifferentFiles', 'GetEmail', 'GetPatchName', | 385         'GetCheckoutRoot', 'GetDifferentFiles', 'GetEmail', 'GetPatchName', | 
| 385         'GetSVNBranch', 'GetUpstream', 'IsGitSvn', 'RunAndFilterOutput', | 386         'GetSVNBranch', 'GetUpstream', 'IsGitSvn', 'RunAndFilterOutput', | 
| 386         'ShortBranchName', 'RunCommand', | 387         'ShortBranchName', 'RunCommand', | 
| 387         'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert', | 388         'cleanup', 'diff', 'export', 'pack', 'relpath', 'revert', | 
| 388         'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url', | 389         'revinfo', 'runhooks', 'scm_name', 'status', 'update', 'url', | 
| 389     ] | 390     ] | 
| 390 | 391 | 
| 391     # If you add a member, be sure to add the relevant test! | 392     # If you add a member, be sure to add the relevant test! | 
| 392     self.compareMembers(gclient_scm.CreateSCM(url=self.url), members) | 393     self.compareMembers(gclient_scm.CreateSCM(url=self.url), members) | 
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 587                                 relpath=self.relpath) | 588                                 relpath=self.relpath) | 
| 588     rev_info = scm.revinfo(options, (), None) | 589     rev_info = scm.revinfo(options, (), None) | 
| 589     self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458') | 590     self.assertEquals(rev_info, '069c602044c5388d2d15c3f875b057c852003458') | 
| 590 | 591 | 
| 591 | 592 | 
| 592 if __name__ == '__main__': | 593 if __name__ == '__main__': | 
| 593   import unittest | 594   import unittest | 
| 594   unittest.main() | 595   unittest.main() | 
| 595 | 596 | 
| 596 # vim: ts=2:sw=2:tw=80:et: | 597 # vim: ts=2:sw=2:tw=80:et: | 
| OLD | NEW | 
|---|