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

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

Issue 439503006: For consistency with benchmark, rename unittest.output_formatter -> progress_reporter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tic_gtest_did_run_test
Patch Set: Rebase. Created 6 years, 4 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/gtest_progress_reporter_unittest.py
diff --git a/tools/telemetry/telemetry/unittest/gtest_output_formatter_unittest.py b/tools/telemetry/telemetry/unittest/gtest_progress_reporter_unittest.py
similarity index 77%
rename from tools/telemetry/telemetry/unittest/gtest_output_formatter_unittest.py
rename to tools/telemetry/telemetry/unittest/gtest_progress_reporter_unittest.py
index 0eff246f0fb05480384170f9baed66cd703adda8..c13be4617b23fe46ffbc35bdd59afe379ae98689 100644
--- a/tools/telemetry/telemetry/unittest/gtest_output_formatter_unittest.py
+++ b/tools/telemetry/telemetry/unittest/gtest_progress_reporter_unittest.py
@@ -5,7 +5,7 @@
import unittest
import sys
-from telemetry.unittest import gtest_output_formatter
+from telemetry.unittest import gtest_progress_reporter
from telemetry.unittest import simple_mock
@@ -49,18 +49,19 @@ class TestResultWithSuccesses(unittest.TestResult):
self.successes.append(test)
-class GTestOutputFormatterTest(unittest.TestCase):
+class GTestProgressReporterTest(unittest.TestCase):
def setUp(self):
- super(GTestOutputFormatterTest, self).setUp()
+ super(GTestProgressReporterTest, self).setUp()
self._stream = TestOutputStream()
- self._formatter = gtest_output_formatter.GTestOutputFormatter(self._stream)
+ self._formatter = gtest_progress_reporter.GTestProgressReporter(
+ self._stream)
self._mock_timer = simple_mock.MockTimer()
- self._real_time_time = gtest_output_formatter.time.time
- gtest_output_formatter.time.time = self._mock_timer.GetTime
+ self._real_time_time = gtest_progress_reporter.time.time
+ gtest_progress_reporter.time.time = self._mock_timer.GetTime
def tearDown(self):
- gtest_output_formatter.time.time = self._real_time_time
+ gtest_progress_reporter.time.time = self._real_time_time
def testTestSuiteWithWrapperSuite(self):
suite = unittest.TestSuite()
@@ -87,9 +88,10 @@ class GTestOutputFormatterTest(unittest.TestCase):
self._mock_timer.SetTime(0.042)
self._formatter.Failure(test, DUMMY_EXCEPTION)
- expected = ('[ RUN ] gtest_output_formatter_unittest.TestFoo.runTezt\n'
- '[ FAILED ] gtest_output_formatter_unittest.TestFoo.runTezt '
- '(42 ms)\n')
+ expected = (
+ '[ RUN ] gtest_progress_reporter_unittest.TestFoo.runTezt\n'
+ '[ FAILED ] gtest_progress_reporter_unittest.TestFoo.runTezt '
+ '(42 ms)\n')
self.assertEqual(self._stream.output_data, expected)
def testCaseSuccess(self):
@@ -98,9 +100,10 @@ class GTestOutputFormatterTest(unittest.TestCase):
self._mock_timer.SetTime(0.042)
self._formatter.Success(test)
- expected = ('[ RUN ] gtest_output_formatter_unittest.TestFoo.runTezt\n'
- '[ OK ] gtest_output_formatter_unittest.TestFoo.runTezt '
- '(42 ms)\n')
+ expected = (
+ '[ RUN ] gtest_progress_reporter_unittest.TestFoo.runTezt\n'
+ '[ OK ] gtest_progress_reporter_unittest.TestFoo.runTezt '
+ '(42 ms)\n')
self.assertEqual(self._stream.output_data, expected)
def testStopTestRun(self):
@@ -120,6 +123,6 @@ class GTestOutputFormatterTest(unittest.TestCase):
expected = (
'[ PASSED ] 1 test.\n'
'[ FAILED ] 1 test, listed below:\n'
- '[ FAILED ] gtest_output_formatter_unittest.TestFoo.runTezt\n\n'
+ '[ FAILED ] gtest_progress_reporter_unittest.TestFoo.runTezt\n\n'
'1 FAILED TEST\n\n')
self.assertEqual(self._stream.output_data, expected)
« no previous file with comments | « tools/telemetry/telemetry/unittest/gtest_progress_reporter.py ('k') | tools/telemetry/telemetry/unittest/output_formatter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698