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

Side by Side Diff: tests/scm_unittest.py

Issue 507070: Add gclient_scm.GitWrapper.pack() (Closed)
Patch Set: Cleaner path join Created 10 years, 12 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
« no previous file with comments | « tests/gclient_scm_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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 import shutil 8 import shutil
9 import tempfile 9 import tempfile
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 def tearDown(self): 112 def tearDown(self):
113 shutil.rmtree(self.root_dir) 113 shutil.rmtree(self.root_dir)
114 SuperMoxBaseTestBase.tearDown(self) 114 SuperMoxBaseTestBase.tearDown(self)
115 115
116 def testMembersChanged(self): 116 def testMembersChanged(self):
117 self.mox.ReplayAll() 117 self.mox.ReplayAll()
118 members = [ 118 members = [
119 'COMMAND', 'Capture', 'CaptureStatus', 'FetchUpstreamTuple', 119 'COMMAND', 'Capture', 'CaptureStatus', 'FetchUpstreamTuple',
120 'GenerateDiff', 'GetBranch', 'GetBranchRef', 'GetCheckoutRoot', 120 'GenerateDiff', 'GetBranch', 'GetBranchRef', 'GetCheckoutRoot',
121 'GetEmail', 'GetPatchName', 'GetSVNBranch', 121 'GetEmail', 'GetPatchName', 'GetSVNBranch',
122 'GetUpstream', 'IsGitSvn', 'ShortBranchName', 122 'GetUpstream', 'IsGitSvn', 'RunAndFilterOutput', 'ShortBranchName',
123 ] 123 ]
124 # If this test fails, you should add the relevant test. 124 # If this test fails, you should add the relevant test.
125 self.compareMembers(scm.GIT, members) 125 self.compareMembers(scm.GIT, members)
126 126
127 def testGetEmail(self): 127 def testGetEmail(self):
128 self.mox.StubOutWithMock(scm.GIT, 'Capture') 128 self.mox.StubOutWithMock(scm.GIT, 'Capture')
129 scm.GIT.Capture(['config', 'user.email'], self.fake_root, error_ok=True 129 scm.GIT.Capture(['config', 'user.email'], self.fake_root, error_ok=True
130 ).AndReturn('mini@me.com') 130 ).AndReturn('mini@me.com')
131 self.mox.ReplayAll() 131 self.mox.ReplayAll()
132 self.assertEqual(scm.GIT.GetEmail(self.fake_root), 'mini@me.com') 132 self.assertEqual(scm.GIT.GetEmail(self.fake_root), 'mini@me.com')
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 self.mox.ReplayAll() 319 self.mox.ReplayAll()
320 info = scm.SVN.CaptureStatus(None) 320 info = scm.SVN.CaptureStatus(None)
321 self.assertEquals(info, []) 321 self.assertEquals(info, [])
322 322
323 323
324 if __name__ == '__main__': 324 if __name__ == '__main__':
325 import unittest 325 import unittest
326 unittest.main() 326 unittest.main()
327 327
328 # vim: ts=2:sw=2:tw=80:et: 328 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « tests/gclient_scm_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698