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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/system/output_capture.py

Issue 2578213005: Use underscores to separate words in filenames in webkitpy. (Closed)
Patch Set: Fix check for attribute in output_capture.py. Created 4 years 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: third_party/WebKit/Tools/Scripts/webkitpy/common/system/output_capture.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/outputcapture.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/output_capture.py
similarity index 93%
rename from third_party/WebKit/Tools/Scripts/webkitpy/common/system/outputcapture.py
rename to third_party/WebKit/Tools/Scripts/webkitpy/common/system/output_capture.py
index cd4c00ecbe409caa035a315810406ab8a6cab048..4ef5fdcdb3225aac4b151a98f8ba3ef7149dcc3e 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/outputcapture.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/output_capture.py
@@ -39,10 +39,14 @@ class OutputCapture(object):
def __init__(self):
self.saved_outputs = dict()
self._log_level = logging.INFO
+ self._logs = None
+ self._logs_handler = None
+ self._logger = None
+ self._orig_log_level = None
def set_log_level(self, log_level):
self._log_level = log_level
- if hasattr(self, '_logs_handler'):
+ if self._logs_handler is not None:
self._logs_handler.setLevel(self._log_level)
def _capture_output_with_name(self, output_name):
@@ -78,8 +82,10 @@ class OutputCapture(object):
delattr(self, '_logs')
return (self._restore_output_with_name("stdout"), self._restore_output_with_name("stderr"), logs_string)
- def assert_outputs(self, testcase, function, args=[], kwargs={}, expected_stdout="",
+ def assert_outputs(self, testcase, function, args=None, kwargs=None, expected_stdout="",
expected_stderr="", expected_exception=None, expected_logs=None):
+ args = args or []
+ kwargs = kwargs or {}
self.capture_output()
try:
if expected_exception:

Powered by Google App Engine
This is Rietveld 408576698