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

Unified Diff: tests/presubmit_unittest.py

Issue 4360002: Largely reduce the number of pylint warnings and fix one typo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: address comments Created 10 years, 1 month 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/gclient_utils_test.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
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index f6880025e0790d3d44a967d9cbe14787365536f5..8e59e89158fc5b2e7f615d32bb0f2bdf7a5f9a09 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -37,7 +37,7 @@ def GetPreferredTrySlaves():
def setUp(self):
SuperMoxTestBase.setUp(self)
self.mox.StubOutWithMock(presubmit, 'random')
- self.mox.StubOutWithMock(presubmit, 'warnings')
+ self.mox.StubOutWithMock(presubmit, 'warn')
presubmit._ASKED_FOR_FEEDBACK = False
self.fake_root_dir = self.RootDir()
# Special mocks.
@@ -69,11 +69,11 @@ class PresubmitUnittest(PresubmitTestsBase):
'NotImplementedException', 'OutputApi', 'ParseFiles',
'PresubmitExecuter', 'PromptYesNo', 'ScanSubDirs',
'SvnAffectedFile', 'SvnChange', 'cPickle', 'cStringIO',
- 'exceptions', 'fnmatch', 'gcl', 'gclient_utils', 'glob', 'json',
+ 'exceptions', 'fnmatch', 'gclient_utils', 'glob', 'json',
'logging', 'marshal', 'normpath', 'optparse', 'os', 'pickle',
'presubmit_canned_checks', 'random', 're', 'scm', 'subprocess',
'sys', 'tempfile', 'time', 'traceback', 'types', 'unittest', 'urllib2',
- 'warnings',
+ 'warn',
]
# If this test fails, you should add the relevant test.
self.compareMembers(presubmit, members)
@@ -898,8 +898,7 @@ class InputApiUnittest(PresubmitTestsBase):
normpath(join(self.fake_root_dir, 'isdir', 'blat.cc')))
def testDeprecated(self):
- presubmit.warnings.warn(mox.IgnoreArg(), category=mox.IgnoreArg(),
- stacklevel=2)
+ presubmit.warn(mox.IgnoreArg(), category=mox.IgnoreArg(), stacklevel=2)
self.mox.ReplayAll()
change = presubmit.Change('mychange', '', self.fake_root_dir, [], 0, 0)
« no previous file with comments | « tests/gclient_utils_test.py ('k') | trychange.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698