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

Unified Diff: tests/presubmit_unittest.py

Issue 113290: Deprecate gcl.GetSVNFileInfo() for gclient.CaptureSVNInfo(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: fixed presubmit.py and updated unit tests Created 11 years, 7 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/gcl_unittest.py ('k') | trychange.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
===================================================================
--- tests/presubmit_unittest.py (revision 15890)
+++ tests/presubmit_unittest.py (working copy)
@@ -11,6 +11,7 @@
# Local imports
import gcl
+import gclient
import presubmit
import presubmit_canned_checks
@@ -24,8 +25,8 @@
return dir.endswith('haspresubmit') or dir == ''
os.path.isfile = MockIsFile
- self.original_GetSVNFileInfo = gcl.GetSVNFileInfo
- def MockGetSVNFileInfo(path):
+ self.original_CaptureSVNInfo = gclient.CaptureSVNInfo
+ def MockCaptureSVNInfo(path):
if path.count('notfound'):
return {}
results = {
@@ -37,7 +38,7 @@
else:
results['Node Kind'] = 'file'
return results
- gcl.GetSVNFileInfo = MockGetSVNFileInfo
+ gclient.CaptureSVNInfo = MockCaptureSVNInfo
self.original_GetSVNFileProperty = gcl.GetSVNFileProperty
def MockGetSVNFileProperty(path, property_name):
@@ -81,7 +82,7 @@
def tearDown(self):
os.path.isfile = self.original_IsFile
- gcl.GetSVNFileInfo = self.original_GetSVNFileInfo
+ gclient.CaptureSVNInfo = self.original_CaptureSVNInfo
gcl.GetSVNFileProperty = self.original_GetSVNFileProperty
gcl.ReadFile = self.original_ReadFile
gcl.GetRepositoryRoot = self.original_GetRepositoryRoot
@@ -111,8 +112,8 @@
'ListRelevantPresubmitFiles', 'Main', 'NotImplementedException',
'OutputApi', 'ParseFiles', 'PresubmitExecuter', 'SPECIAL_KEYS',
'ScanSubDirs', 'cPickle', 'cStringIO', 'exceptions',
- 'fnmatch', 'gcl', 'glob', 'marshal', 'normpath', 'optparse', 'os',
- 'pickle', 'presubmit_canned_checks', 're', 'subprocess', 'sys',
+ 'fnmatch', 'gcl', 'gclient', 'glob', 'marshal', 'normpath', 'optparse',
+ 'os', 'pickle', 'presubmit_canned_checks', 're', 'subprocess', 'sys',
'tempfile', 'types', 'urllib2',
]
# If this test fails, you should add the relevant test.
« no previous file with comments | « tests/gcl_unittest.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698