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

Unified Diff: tools/telemetry/telemetry/results/gtest_test_results_unittest.py

Issue 390233002: Kill AddError/AddErrorMessage from PageTestResults. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and simplify unit test a bit. Created 6 years, 5 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/results/gtest_test_results_unittest.py
diff --git a/tools/telemetry/telemetry/results/gtest_test_results_unittest.py b/tools/telemetry/telemetry/results/gtest_test_results_unittest.py
index b7ad5a85ea23cd8f3c6476ef5cb4121d7423e4b8..2013a237bb9f36bd6265993ac5601315ffea4bb8 100644
--- a/tools/telemetry/telemetry/results/gtest_test_results_unittest.py
+++ b/tools/telemetry/telemetry/results/gtest_test_results_unittest.py
@@ -69,23 +69,6 @@ class GTestTestResultsTest(
'1 FAILED TEST\n\n' % exception_trace)
self.assertEquals(expected, ''.join(results.output_data))
- def testSingleErrorPage(self):
- test_page_set = _MakePageSet()
- results = SummaryGtestTestResults()
- results.StartTest(test_page_set.pages[0])
- exception = self.CreateException()
- results.AddError(test_page_set.pages[0], exception)
- results.PrintSummary()
- exception_trace = ''.join(traceback.format_exception(*exception))
- expected = ('[ RUN ] http://www.foo.com/\n'
- '%s\n'
- '[ FAILED ] http://www.foo.com/ (0 ms)\n'
- '[ PASSED ] 0 tests.\n'
- '[ FAILED ] 1 test, listed below:\n'
- '[ FAILED ] http://www.foo.com/\n\n'
- '1 FAILED TEST\n\n' % exception_trace)
- self.assertEquals(expected, ''.join(results.output_data))
-
def testSingleSkippedPage(self):
test_page_set = _MakePageSet()
results = SummaryGtestTestResults()
@@ -109,7 +92,7 @@ class GTestTestResultsTest(
results.StartTest(test_page_set.pages[1])
self._mock_timer.SetTime(0.009)
- results.AddError(test_page_set.pages[1], exception)
+ results.AddFailure(test_page_set.pages[1], exception)
results.StartTest(test_page_set.pages[2])
self._mock_timer.SetTime(0.015)
@@ -153,7 +136,7 @@ class GTestTestResultsTest(
results.StartTest(test_page_set.pages[1])
self._mock_timer.SetTime(0.009)
exception_trace = ''.join(traceback.format_exception(*exception))
- results.AddError(test_page_set.pages[1], exception)
+ results.AddFailure(test_page_set.pages[1], exception)
expected = ('[ RUN ] http://www.foo.com/\n'
'[ OK ] http://www.foo.com/ (7 ms)\n'
'[ RUN ] http://www.bar.com/\n'
« no previous file with comments | « tools/telemetry/telemetry/results/gtest_test_results.py ('k') | tools/telemetry/telemetry/results/page_measurement_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698