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

Side by Side Diff: tests/scm_unittest.py

Issue 3353018: Make gclient_scm_test much more silent (Closed)
Patch Set: gclient_scm_test can now be run Created 10 years, 3 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) 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 scm.py.""" 6 """Unit tests for scm.py."""
7 7
8 from shutil import rmtree 8 from shutil import rmtree
9 import tempfile 9 import tempfile
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 'FetchUpstreamTuple', 53 'FetchUpstreamTuple',
54 'GenerateDiff', 'GetBranch', 'GetBranchRef', 'GetCheckoutRoot', 54 'GenerateDiff', 'GetBranch', 'GetBranchRef', 'GetCheckoutRoot',
55 'GetDifferentFiles', 'GetEmail', 'GetPatchName', 'GetSVNBranch', 55 'GetDifferentFiles', 'GetEmail', 'GetPatchName', 'GetSVNBranch',
56 'GetUpstreamBranch', 'IsGitSvn', 'ShortBranchName', 56 'GetUpstreamBranch', 'IsGitSvn', 'ShortBranchName',
57 ] 57 ]
58 # If this test fails, you should add the relevant test. 58 # If this test fails, you should add the relevant test.
59 self.compareMembers(scm.GIT, members) 59 self.compareMembers(scm.GIT, members)
60 60
61 def testGetEmail(self): 61 def testGetEmail(self):
62 self.mox.StubOutWithMock(scm.GIT, 'Capture') 62 self.mox.StubOutWithMock(scm.GIT, 'Capture')
63 scm.GIT.Capture(['config', 'user.email'], self.root_dir, error_ok=True 63 scm.GIT.Capture(['config', 'user.email'], cwd=self.root_dir
64 ).AndReturn(['mini@me.com', '']) 64 ).AndReturn('mini@me.com')
65 self.mox.ReplayAll() 65 self.mox.ReplayAll()
66 self.assertEqual(scm.GIT.GetEmail(self.root_dir), 'mini@me.com') 66 self.assertEqual(scm.GIT.GetEmail(self.root_dir), 'mini@me.com')
67 67
68 68
69 class SVNTestCase(BaseSCMTestCase): 69 class SVNTestCase(BaseSCMTestCase):
70 def setUp(self): 70 def setUp(self):
71 BaseSCMTestCase.setUp(self) 71 BaseSCMTestCase.setUp(self)
72 self.mox.StubOutWithMock(scm.SVN, 'Capture') 72 self.mox.StubOutWithMock(scm.SVN, 'Capture')
73 self.url = self.SvnUrl() 73 self.url = self.SvnUrl()
74 74
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 self.mox.ReplayAll() 232 self.mox.ReplayAll()
233 info = scm.SVN.CaptureStatus(None) 233 info = scm.SVN.CaptureStatus(None)
234 self.assertEquals(info, []) 234 self.assertEquals(info, [])
235 235
236 236
237 if __name__ == '__main__': 237 if __name__ == '__main__':
238 import unittest 238 import unittest
239 unittest.main() 239 unittest.main()
240 240
241 # vim: ts=2:sw=2:tw=80:et: 241 # 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