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

Unified Diff: tests/gcl_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 | « presubmit.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gcl_unittest.py
===================================================================
--- tests/gcl_unittest.py (revision 15890)
+++ tests/gcl_unittest.py (working copy)
@@ -48,53 +48,20 @@
'ErrorExit', 'GenerateChangeName', 'GenerateDiff', 'GetCLs',
'GetChangelistInfoFile', 'GetCodeReviewSetting', 'GetEditor',
'GetFilesNotInCL', 'GetInfoDir', 'GetIssueDescription',
- 'GetModifiedFiles', 'GetNamedNodeText', 'GetNodeNamedAttributeText',
- 'GetRepositoryRoot', 'GetSVNFileInfo', 'GetSVNStatus',
+ 'GetModifiedFiles', 'GetRepositoryRoot', 'GetSVNStatus',
'GetSVNFileProperty', 'Help', 'IGNORE_PATHS', 'IsSVNMoved', 'IsTreeOpen',
'Lint', 'LoadChangelistInfo', 'LoadChangelistInfoForMultiple',
- 'MISSING_TEST_MSG', 'Opened', 'ParseXML', 'PresubmitCL', 'ReadFile',
+ 'MISSING_TEST_MSG', 'Opened', 'PresubmitCL', 'ReadFile',
'RunShell',
'RunShellWithReturnCode', 'SEPARATOR', 'SendToRietveld', 'TryChange',
- 'UnknownFiles', 'UploadCL', 'Warn', 'WriteFile', 'gcl_info_dir',
- 'getpass', 'main', 'os', 'random', 're', 'read_gcl_info',
+ 'UnknownFiles', 'UploadCL', 'Warn', 'WriteFile', 'gclient',
+ 'gcl_info_dir', 'getpass', 'main', 'os', 'random', 're', 'read_gcl_info',
'repository_root', 'string', 'subprocess', 'sys', 'tempfile', 'upload',
'urllib2', 'xml',
]
# If this test fails, you should add the relevant test.
self.compareMembers(gcl, members)
- def testGetSVNFileInfo(self):
- def RunShellMock(command):
- return r"""<?xml version="1.0"?>
-<info>
-<entry kind="file" path="%s" revision="14628">
-<url>http://src.chromium.org/svn/trunk/src/chrome/app/d</url>
-<repository><root>http://src.chromium.org/svn</root></repository>
-<wc-info>
-<schedule>add</schedule>
-<depth>infinity</depth>
-<copy-from-url>http://src.chromium.org/svn/trunk/src/chrome/app/DEPS</copy-from-url>
-<copy-from-rev>14628</copy-from-rev>
-<checksum>369f59057ba0e6d9017e28f8bdfb1f43</checksum>
-</wc-info>
-</entry>
-</info>
-""" % command[3]
- # GclTestsBase.tearDown will restore the original.
- gcl.RunShell = RunShellMock
- filename = os.path.join('app', 'd')
- info = gcl.GetSVNFileInfo(filename)
- expected = {
- 'URL': 'http://src.chromium.org/svn/trunk/src/chrome/app/d',
- 'Repository Root': 'http://src.chromium.org/svn',
- 'Schedule': 'add',
- 'Copied From URL': 'http://src.chromium.org/svn/trunk/src/chrome/app/DEPS',
- 'Copied From Rev': '14628',
- 'Path': filename,
- 'Node Kind': 'file',
- }
- self.assertEquals(sorted(info.items()), sorted(expected.items()))
-
def testGetSVNStatus(self):
def RunShellMock(command):
return r"""<?xml version="1.0"?>
« no previous file with comments | « presubmit.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698