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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/desktop_browser_finder_unittest.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/desktop_browser_finder_unittest.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/desktop_browser_finder_unittest.py b/tools/chrome_remote_control/chrome_remote_control/desktop_browser_finder_unittest.py
index c122ccb3f694400316cfacfcf00c9ca8a3c00054..c75ab02450beedef0aa7dfe6c87918474a7ed101 100644
--- a/tools/chrome_remote_control/chrome_remote_control/desktop_browser_finder_unittest.py
+++ b/tools/chrome_remote_control/chrome_remote_control/desktop_browser_finder_unittest.py
@@ -1,12 +1,14 @@
# 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 unittest
from chrome_remote_control import browser_options
from chrome_remote_control import desktop_browser_finder
-from chrome_remote_control.system_stub import *
+from chrome_remote_control.system_stub import (
+ OSModuleStub,
+ SysModuleStub
+ )
# This file verifies the logic for finding a browser instance on all platforms
# at once. It does so by providing stubs for the OS/sys/subprocess primitives
@@ -82,10 +84,10 @@ class LinuxFindTest(FindTestBase):
self._files.append('../../../out/Release/content_shell')
self._files.append('../../../out/Debug/content_shell')
- self._has_google_chrome_on_path = False
+ self.has_google_chrome_on_path = False
this = self
- def call_hook(*args, **kwargs):
- if this._has_google_chrome_on_path:
+ def call_hook(*args, **kwargs): # pylint: disable=W0613
+ if this.has_google_chrome_on_path:
return 0
raise OSError('Not found')
self._subprocess_stub.call_hook = call_hook
@@ -102,14 +104,14 @@ class LinuxFindTest(FindTestBase):
self.assertTrue('exact' in self.DoFindAllTypes())
def testFindUsingDefaults(self):
- self._has_google_chrome_on_path = True
+ self.has_google_chrome_on_path = True
self.assertTrue('release' in self.DoFindAllTypes())
del self._files[1]
- self._has_google_chrome_on_path = True
+ self.has_google_chrome_on_path = True
self.assertTrue('system' in self.DoFindAllTypes())
- self._has_google_chrome_on_path = False
+ self.has_google_chrome_on_path = False
del self._files[1]
self.assertEquals(['content-shell-debug', 'content-shell-release'],
self.DoFindAllTypes())

Powered by Google App Engine
This is Rietveld 408576698