瀏覽代碼

Added os to input_api

BUG=
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/614413003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292291 0039d316-1c4b-4281-b951-d872f2087c98
pgervais@chromium.org 11 年之前
父節點
當前提交
bd0cace8c1
共有 2 個文件被更改,包括 4 次插入3 次删除
  1. 1 0
      presubmit_support.py
  2. 3 3
      tests/presubmit_unittest.py

+ 1 - 0
presubmit_support.py

@@ -292,6 +292,7 @@ class InputApi(object):
     self.os_listdir = os.listdir
     self.os_walk = os.walk
     self.os_path = os.path
+    self.os_stat = os.stat
     self.pickle = pickle
     self.marshal = marshal
     self.re = re

+ 3 - 3
tests/presubmit_unittest.py

@@ -1189,9 +1189,9 @@ class InputApiUnittest(PresubmitTestsBase):
       'PresubmitLocalPath', 'ReadFile', 'RightHandSideLines', 'ServerPaths',
       'basename', 'cPickle', 'cpplint', 'cStringIO', 'canned_checks', 'change',
       'environ', 'glob', 'host_url', 'is_committing', 'json', 'logging',
-      'marshal', 'os_listdir', 'os_walk', 'os_path', 'owners_db', 'pickle',
-      'platform', 'python_executable', 're', 'rietveld', 'subprocess', 'tbr',
-      'tempfile', 'time', 'traceback', 'unittest', 'urllib2', 'version',
+      'marshal', 'os_listdir', 'os_walk', 'os_path', 'os_stat', 'owners_db',
+      'pickle', 'platform', 'python_executable', 're', 'rietveld', 'subprocess',
+      'tbr', 'tempfile', 'time', 'traceback', 'unittest', 'urllib2', 'version',
       'verbose',
     ]
     # If this test fails, you should add the relevant test.