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

Unified Diff: tests/scm_unittest.py

Issue 3126020: Remove code duplication and improve style. (Closed)
Patch Set: Created 10 years, 4 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 | « tests/gclient_utils_test.py ('k') | no next file » | 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 d2acc04b9e637b99737474a17631c8679a08d2f5..ac1e340264efe1b9491c886983e90fc21c281b8b 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -28,6 +28,7 @@ class BaseTestCase(SuperMoxTestBase):
class BaseSCMTestCase(BaseTestCase):
def setUp(self):
BaseTestCase.setUp(self)
+ self.mox.StubOutWithMock(scm.gclient_utils, 'Popen')
self.mox.StubOutWithMock(scm.gclient_utils, 'SubprocessCall')
self.mox.StubOutWithMock(scm.gclient_utils, 'SubprocessCallAndFilter')
@@ -295,11 +296,10 @@ class SVNTestCase(BaseSCMTestCase):
</status>
"""
proc = self.mox.CreateMockAnything()
- scm.subprocess.Popen(['svn', 'status', '--xml', '.'],
- cwd=None,
- shell=scm.sys.platform.startswith('win'),
- stderr=None,
- stdout=scm.subprocess.PIPE).AndReturn(proc)
+ scm.gclient_utils.Popen(['svn', 'status', '--xml', '.'],
+ cwd=None,
+ stderr=None,
+ stdout=scm.subprocess.PIPE).AndReturn(proc)
proc.communicate().AndReturn((text, 0))
self.mox.ReplayAll()
@@ -328,11 +328,10 @@ class SVNTestCase(BaseSCMTestCase):
</target>
</status>"""
proc = self.mox.CreateMockAnything()
- scm.subprocess.Popen(['svn', 'status', '--xml'],
- cwd=None,
- shell=scm.sys.platform.startswith('win'),
- stderr=None,
- stdout=scm.subprocess.PIPE).AndReturn(proc)
+ scm.gclient_utils.Popen(['svn', 'status', '--xml'],
+ cwd=None,
+ stderr=None,
+ stdout=scm.subprocess.PIPE).AndReturn(proc)
proc.communicate().AndReturn((text, 0))
self.mox.ReplayAll()
info = scm.SVN.CaptureStatus(None)
« no previous file with comments | « tests/gclient_utils_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698