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

Unified Diff: tools/chrome_remote_control/chrome_remote_control/page_test.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/page_test.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/page_test.py b/tools/chrome_remote_control/chrome_remote_control/page_test.py
index eab98c77e8b7700dd0f0947816273483c8780f04..7b43a0dc795e6456e3994c5f09da67173cbd6f58 100644
--- a/tools/chrome_remote_control/chrome_remote_control/page_test.py
+++ b/tools/chrome_remote_control/chrome_remote_control/page_test.py
@@ -1,12 +1,6 @@
# 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 csv
-import logging
-import os
-import sys
-import traceback
-
class Failure(Exception):
"""Exception that can be thrown from MultiPageBenchmark to indicate an
undesired but designed-for problem."""
@@ -19,17 +13,18 @@ class PageTestResults(object):
def AddFailure(self, page, exception, trace):
self.page_failures.append({'page': page,
'exception': exception,
- 'trace': traceback.format_exc()})
+ 'trace': trace})
class PageTest(object):
"""A class styled on unittest.TestCase for creating page-specific tests."""
def __init__(self, test_method_name):
+ self.options = None
try:
self._test_method = getattr(self, test_method_name)
except AttributeError:
raise ValueError, 'No such method %s.%s' % (
- self.__class_, test_method_name)
+ self.__class_, test_method_name) # pylint: disable=E1101
def AddOptions(self, parser):
"""Override to expose command-line options for this benchmark.
@@ -47,6 +42,5 @@ class PageTest(object):
self.options = options
try:
self._test_method(page, tab, results)
- pass
finally:
self.options = None

Powered by Google App Engine
This is Rietveld 408576698