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

Unified Diff: tests/scm_unittest.py

Issue 8771042: Enforces using cwd in all svn calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 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
Index: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index 78d5d4dc9973f833f6d1d0c355503c7cab0d5fe1..2de8a8164e676d2f9e0c986cf43d4df307d36b22 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -108,15 +108,15 @@ class SVNTestCase(BaseSCMTestCase):
self.mox.StubOutWithMock(scm, 'GetCasedPath')
scm.os.path.abspath = lambda x: x
scm.GetCasedPath = lambda x: x
- scm.SVN.CaptureInfo(self.root_dir + '/foo/bar').AndReturn({
+ scm.SVN.CaptureInfo(None, self.root_dir + '/foo/bar').AndReturn({
'Repository Root': 'svn://svn.chromium.org/chrome',
'URL': 'svn://svn.chromium.org/chrome/trunk/src',
})
- scm.SVN.CaptureInfo(self.root_dir + '/foo').AndReturn({
+ scm.SVN.CaptureInfo(None, self.root_dir + '/foo').AndReturn({
'Repository Root': 'svn://svn.chromium.org/chrome',
'URL': 'svn://svn.chromium.org/chrome/trunk',
})
- scm.SVN.CaptureInfo(self.root_dir).AndReturn({
+ scm.SVN.CaptureInfo(None, self.root_dir).AndReturn({
'Repository Root': 'svn://svn.chromium.org/chrome',
'URL': 'svn://svn.chromium.org/chrome/trunk/tools/commit-queue/workdir',
})
@@ -140,7 +140,7 @@ class SVNTestCase(BaseSCMTestCase):
</entry>
</info>
""" % self.url
- scm.SVN.Capture(['info', '--xml', self.url]).AndReturn(xml_text)
+ scm.SVN.Capture(['info', '--xml', self.url], None).AndReturn(xml_text)
expected = {
'URL': 'http://src.chromium.org/svn/trunk/src/chrome/app/d',
'UUID': None,
@@ -154,7 +154,7 @@ class SVNTestCase(BaseSCMTestCase):
'Node Kind': 'file',
}
self.mox.ReplayAll()
- file_info = scm.SVN.CaptureInfo(self.url)
+ file_info = scm.SVN.CaptureInfo(self.url, None)
self.assertEquals(sorted(file_info.items()), sorted(expected.items()))
def testCaptureInfo(self):
@@ -181,9 +181,9 @@ class SVNTestCase(BaseSCMTestCase):
</entry>
</info>
""" % (self.url, self.root_dir)
- scm.SVN.Capture(['info', '--xml', self.url]).AndReturn(xml_text)
+ scm.SVN.Capture(['info', '--xml', self.url], None).AndReturn(xml_text)
self.mox.ReplayAll()
- file_info = scm.SVN.CaptureInfo(self.url)
+ file_info = scm.SVN.CaptureInfo(self.url, None)
expected = {
'URL': self.url,
'UUID': '7b9385f5-0452-0410-af26-ad4892b7a1fb',
@@ -235,10 +235,10 @@ class SVNTestCase(BaseSCMTestCase):
</target>
</status>
"""
- scm.SVN.Capture(['status', '--xml', '.']).AndReturn(text)
+ scm.SVN.Capture(['status', '--xml'], '.').AndReturn(text)
self.mox.ReplayAll()
- info = scm.SVN.CaptureStatus('.')
+ info = scm.SVN.CaptureStatus(None, '.')
expected = [
('? ', 'unversionned_file.txt'),
('M ', 'build\\internal\\essential.vsprops'),
@@ -255,9 +255,9 @@ class SVNTestCase(BaseSCMTestCase):
path="perf">
</target>
</status>"""
- scm.SVN.Capture(['status', '--xml']).AndReturn(text)
+ scm.SVN.Capture(['status', '--xml'], None).AndReturn(text)
self.mox.ReplayAll()
- info = scm.SVN.CaptureStatus(None)
+ info = scm.SVN.CaptureStatus(None, None)
self.assertEquals(info, [])
« gclient_scm.py ('K') | « tests/presubmit_unittest.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698