Commit fb11c7b9 authored by maruel@chromium.org's avatar maruel@chromium.org

Add input_api.json to presubmit checks.

Review URL: http://codereview.chromium.org/1116001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@41973 0039d316-1c4b-4281-b951-d872f2087c98
parent 57af1710
......@@ -34,6 +34,15 @@ import unittest # Exposed through the API.
import urllib2 # Exposed through the API.
import warnings
# json may not be available.
try:
import simplejson as json
except ImportError:
try:
import json
except ImportError:
json = None
# Local imports.
import gcl
import gclient_utils
......@@ -196,6 +205,7 @@ class InputApi(object):
self.basename = os.path.basename
self.cPickle = cPickle
self.cStringIO = cStringIO
self.json = json
self.os_path = os.path
self.pickle = pickle
self.marshal = marshal
......
......@@ -66,7 +66,7 @@ class PresubmitUnittest(PresubmitTestsBase):
'NotImplementedException', 'OutputApi', 'ParseFiles',
'PresubmitExecuter', 'PromptYesNo', 'ScanSubDirs',
'SvnAffectedFile', 'SvnChange', 'cPickle', 'cStringIO',
'exceptions', 'fnmatch', 'gcl', 'gclient_utils', 'glob',
'exceptions', 'fnmatch', 'gcl', 'gclient_utils', 'glob', 'json',
'logging', 'marshal', 'normpath', 'optparse', 'os', 'pickle',
'presubmit_canned_checks', 'random', 're', 'scm', 'subprocess', 'sys',
'tempfile', 'time', 'traceback', 'types', 'unittest', 'urllib2',
......@@ -560,7 +560,7 @@ class InputApiUnittest(PresubmitTestsBase):
'LocalToDepotPath',
'PresubmitLocalPath', 'ReadFile', 'RightHandSideLines', 'ServerPaths',
'basename', 'cPickle', 'cStringIO', 'canned_checks', 'change', 'environ',
'is_committing', 'marshal', 'os_path', 'pickle', 'platform',
'is_committing', 'json', 'marshal', 'os_path', 'pickle', 'platform',
'python_executable',
're', 'subprocess', 'tempfile', 'traceback', 'unittest', 'urllib2',
'version',
......
......@@ -42,9 +42,9 @@ class TryChangeUnittest(TryChangeTestsBase):
'EscapeDot', 'GIT', 'GuessVCS', 'GetMungedDiff',
'HELP_STRING', 'InvalidScript', 'NoTryServerAccess', 'PrintSuccess',
'SCM', 'SVN', 'TryChange', 'USAGE',
'breakpad', 'datetime', 'errno', 'gclient_utils', 'getpass', 'logging',
'optparse', 'os', 'posixpath', 're', 'scm', 'shutil', 'sys', 'tempfile',
'urllib',
'breakpad', 'datetime', 'errno', 'gclient_utils', 'getpass', 'json',
'logging', 'optparse', 'os', 'posixpath', 're', 'scm', 'shutil', 'sys',
'tempfile', 'urllib',
]
# If this test fails, you should add the relevant test.
self.compareMembers(trychange, members)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment