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

Unified Diff: tools/telemetry/telemetry/unittest_util/gtest_progress_reporter_unittest.py

Issue 1112773003: [Telemetry] Move TestStreamOutput to unittest_util. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/telemetry/telemetry/unittest_util/gtest_progress_reporter_unittest.py
diff --git a/tools/telemetry/telemetry/unittest_util/gtest_progress_reporter_unittest.py b/tools/telemetry/telemetry/unittest_util/gtest_progress_reporter_unittest.py
index 6345a4a357269a9f7caf9290950387dc38c0e3c0..bab63f6b1c815d4cd7941e23bd074007a2aaea59 100644
--- a/tools/telemetry/telemetry/unittest_util/gtest_progress_reporter_unittest.py
+++ b/tools/telemetry/telemetry/unittest_util/gtest_progress_reporter_unittest.py
@@ -8,6 +8,7 @@ import unittest
from telemetry.core import exceptions
from telemetry.unittest_util import gtest_progress_reporter
from telemetry.unittest_util import simple_mock
+from telemetry.unittest_util import stream
try:
@@ -23,21 +24,6 @@ class TestFoo(unittest.TestCase):
pass
-class TestOutputStream(object):
- def __init__(self):
- self._output_data = []
-
- @property
- def output_data(self):
- return ''.join(self._output_data)
-
- def write(self, data):
- self._output_data.append(data)
-
- def flush(self):
- pass
-
-
class TestResultWithSuccesses(unittest.TestResult):
def __init__(self):
super(TestResultWithSuccesses, self).__init__()
@@ -51,7 +37,7 @@ class TestResultWithSuccesses(unittest.TestResult):
class GTestProgressReporterTest(unittest.TestCase):
def setUp(self):
super(GTestProgressReporterTest, self).setUp()
- self._stream = TestOutputStream()
+ self._stream = stream.TestOutputStream()
self._formatter = gtest_progress_reporter.GTestProgressReporter(
self._stream)

Powered by Google App Engine
This is Rietveld 408576698