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

Unified Diff: tests/gcl_unittest.py

Issue 8344085: Revert r106358 "Get rid of RunShell*() functions in gcl.py to finish the conversion to subprocess2" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gcl_unittest.py
diff --git a/tests/gcl_unittest.py b/tests/gcl_unittest.py
index 5b38934782422c92775d5df350cf4e213a78fa66..e013df2e24b677e1a0ac332ce59ac90d1450143f 100755
--- a/tests/gcl_unittest.py
+++ b/tests/gcl_unittest.py
@@ -20,8 +20,7 @@ class GclTestsBase(SuperMoxTestBase):
def setUp(self):
SuperMoxTestBase.setUp(self)
self.fake_root_dir = self.RootDir()
- self.mox.StubOutWithMock(gcl.subprocess2, 'call')
- self.mox.StubOutWithMock(gcl.subprocess2, 'check_output')
+ self.mox.StubOutWithMock(gcl, 'RunShell')
self.mox.StubOutWithMock(gcl.SVN, 'CaptureInfo')
self.mox.StubOutWithMock(gcl.SVN, 'GetCheckoutRoot')
self.mox.StubOutWithMock(gcl, 'tempfile')
@@ -89,7 +88,8 @@ class GclUnittest(GclTestsBase):
'GetModifiedFiles', 'GetRepositoryRoot', 'ListFiles',
'LoadChangelistInfoForMultiple', 'MISSING_TEST_MSG',
'OptionallyDoPresubmitChecks', 'REPOSITORY_ROOT', 'REVIEWERS_REGEX',
- 'SVN', 'TryChange', 'UnknownFiles', 'Warn',
+ 'RunShell', 'RunShellWithReturnCode', 'SVN',
+ 'TryChange', 'UnknownFiles', 'Warn',
'attrs', 'breakpad', 'defer_attributes', 'fix_encoding',
'gclient_utils', 'json', 'main', 'need_change', 'need_change_and_args',
'no_args', 'optparse', 'os', 'presubmit_support', 'random', 're',
@@ -527,9 +527,8 @@ class CMDCommitUnittest(GclTestsBase):
gcl.os.getcwd().AndReturn('prev')
gcl.os.chdir(change_info.GetLocalRoot())
- gcl.subprocess2.check_output(
- ['svn', 'commit', '--file=commit', '--targets=files']
- ).AndReturn(shell_output)
+ gcl.RunShell(['svn', 'commit', '--file=commit', '--targets=files'],
+ True).AndReturn(shell_output)
if 'Committed' in shell_output:
self.mox.StubOutWithMock(gcl, 'GetCodeReviewSetting')
gcl.GetCodeReviewSetting('VIEW_VC').AndReturn('http://view/')
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698