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

Unified Diff: tests/scm_unittest.py

Issue 507061: Move GenerateDiff into a common function. (Closed)
Patch Set: mult Created 11 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/gclient_utils_test.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index fc05677405b6d929acb3baea80f39956d3ee9228..27696f73b810c24debe47ab47ab3c2306b978194 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -25,7 +25,8 @@ class RootTestCase(BaseSCMTestCase):
self.mox.ReplayAll()
members = [
'GIT', 'SVN',
- 'gclient_utils', 'os', 're', 'subprocess', 'sys', 'tempfile', 'xml',
+ 'gclient_utils', 'os', 're', 'shutil', 'subprocess', 'sys', 'tempfile',
+ 'xml',
]
# If this test fails, you should add the relevant test.
self.compareMembers(scm, members)
@@ -115,14 +116,17 @@ from :3
def testMembersChanged(self):
self.mox.ReplayAll()
members = [
- 'COMMAND', 'Capture', 'CaptureStatus', 'GetEmail',
+ 'COMMAND', 'Capture', 'CaptureStatus', 'FetchUpstreamTuple',
+ 'GenerateDiff', 'GetBranchRef', 'GetEmail', 'GetSVNBranch',
+ 'GetUpstream', 'IsGitSvn', 'ShortBranchName'
]
# If this test fails, you should add the relevant test.
self.compareMembers(scm.GIT, members)
def testGetEmail(self):
self.mox.StubOutWithMock(scm.GIT, 'Capture')
- scm.GIT.Capture(['config', 'user.email'], self.fake_root).AndReturn('mini@me.com')
+ scm.GIT.Capture(['config', 'user.email'], self.fake_root, error_ok=True
+ ).AndReturn('mini@me.com')
self.mox.ReplayAll()
self.assertEqual(scm.GIT.GetEmail(self.fake_root), 'mini@me.com')
@@ -139,8 +143,8 @@ class SVNTestCase(BaseSCMTestCase):
self.mox.ReplayAll()
members = [
'COMMAND', 'Capture', 'CaptureHeadRevision', 'CaptureInfo',
- 'CaptureStatus', 'DiffItem', 'GetCheckoutRoot', 'GetEmail',
- 'GetFileProperty', 'IsMoved',
+ 'CaptureStatus', 'DiffItem', 'GenerateDiff', 'GetCheckoutRoot',
+ 'GetEmail', 'GetFileProperty', 'IsMoved',
'ReadSimpleAuth', 'Run', 'RunAndFilterOutput', 'RunAndGetFileList',
]
# If this test fails, you should add the relevant test.
« no previous file with comments | « tests/gclient_utils_test.py ('k') | tests/trychange_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698