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

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

Issue 2256793002: Make docstrings more consistent using format-webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make fix_docstrings match function stricter and fix style/main.py. Created 4 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: third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py
index b66f2f7c9fb1a1bbfa4fb81057d17e905200df68..c76ff1931ef5003d57363aef84279f4bf772bf9f 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/logtesting.py
@@ -28,7 +28,6 @@ logging module.
Inherit from the LoggingTestCase class for basic testing needs. For
more advanced needs (e.g. unit-testing methods that configure logging),
see the TestLogStream class, and perhaps also the LogTesting class.
-
"""
import logging
@@ -42,7 +41,6 @@ class TestLogStream(object):
This is meant for passing to the logging.StreamHandler constructor.
Log messages captured by instances of this object can be tested
using self.assertMessages() below.
-
"""
def __init__(self, test_case):
@@ -50,7 +48,6 @@ class TestLogStream(object):
Args:
test_case: A unittest.TestCase instance.
-
"""
self._test_case = test_case
self.messages = []
@@ -71,7 +68,6 @@ class TestLogStream(object):
"""Assert that the given messages match the logged messages.
messages: A list of log message strings.
-
"""
self._test_case.assertEqual(messages, self.messages)
@@ -96,8 +92,7 @@ class LogTesting(object):
# Check the resulting log messages.
self._log.assertMessages(["INFO: expected message #1",
"WARNING: expected message #2"])
-
- """
+ """
Dirk Pranke 2016/09/06 01:14:27 This indentation seems wrong?
def __init__(self, test_stream, handler):
"""Create an instance.
@@ -108,7 +103,6 @@ class LogTesting(object):
Args:
test_stream: A TestLogStream instance.
handler: The handler added to the logger.
-
"""
self._test_stream = test_stream
self._handler = handler
@@ -143,7 +137,6 @@ class LogTesting(object):
test_case: A unittest.TestCase instance.
logging_level: An integer logging level that is the minimum level
of log messages you would like to test.
-
"""
stream = TestLogStream(test_case)
handler = logging.StreamHandler(stream)
@@ -188,7 +181,6 @@ class LogTesting(object):
Args:
messages: A list of log message strings.
-
"""
try:
self._test_stream.assertMessages(messages)
@@ -222,8 +214,7 @@ class LoggingTestCase(unittest.TestCase):
# Check the resulting log messages.
self.assertLog(["INFO: expected message #1",
"WARNING: expected message #2"])
-
- """
+ """
def setUp(self):
self._log = LogTesting.setUp(self)
@@ -246,6 +237,5 @@ class LoggingTestCase(unittest.TestCase):
Args:
messages: A list of log message strings.
-
"""
self._log.assertMessages(messages)

Powered by Google App Engine
This is Rietveld 408576698