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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/system_stub.py

Issue 10984018: [chrome_remote_control] Add pylint to PRESUMMIT and fix lint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 3 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
Index: tools/chrome_remote_control/chrome_remote_control/system_stub.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/system_stub.py b/tools/chrome_remote_control/chrome_remote_control/system_stub.py
index a777a6c170113d1bf4fcb22ffabb1b4caab92691..aba5d6ee6c178a749706818b9bb7a04506c5909b 100644
--- a/tools/chrome_remote_control/chrome_remote_control/system_stub.py
+++ b/tools/chrome_remote_control/chrome_remote_control/system_stub.py
@@ -1,14 +1,13 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import os as real_os
-import sys as real_sys
-import subprocess as real_subprocess
-
"""Provides stubs for os, sys and subprocess for testing
This test allows one to test code that itself uses os, sys, and subprocess.
"""
+import os as real_os
+import subprocess as real_subprocess
+
class SysModuleStub(object):
def __init__(self):
self.platform = ''
@@ -27,7 +26,7 @@ class OSPathModuleStub(object):
else:
return real_os.path.join(*args)
- def dirname(self, filename):
+ def dirname(self, filename): # pylint: disable=R0201
return real_os.path.dirname(filename)
class OSModuleStub(object):
@@ -56,7 +55,6 @@ class SubprocessModuleStub(object):
def __init__(self):
self.Popen_hook = None
self.Popen_result = None
- import subprocess as real_subprocess
self.PIPE = real_subprocess.PIPE
def Popen(self, *args, **kwargs):

Powered by Google App Engine
This is Rietveld 408576698