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

Unified Diff: tools/telemetry/telemetry/page/page_test_results_unittest.py

Issue 327583002: Move results related stuff to telemetry/results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the directory name from test_results to results Created 6 years, 6 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/page/page_test_results_unittest.py
diff --git a/tools/telemetry/telemetry/page/page_test_results_unittest.py b/tools/telemetry/telemetry/page/page_test_results_unittest.py
deleted file mode 100644
index 01aed88c0f2117a8c10f77972653c1a89fbb4a83..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/page/page_test_results_unittest.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-import os
-import sys
-import unittest
-
-from telemetry.page import page_test_results
-from telemetry.page import page_set
-
-class NonPrintingPageTestResults(
- page_test_results.PageTestResults):
- def __init__(self):
- super(NonPrintingPageTestResults, self).__init__()
-
- def _PrintPerfResult(self, *args):
- pass
-
-class PageTestResultsTest(unittest.TestCase):
- def setUp(self):
- self.page_set = page_set.PageSet(file_path=os.path.dirname(__file__))
- self.page_set.AddPageWithDefaultRunNavigate("http://www.bar.com/")
- self.page_set.AddPageWithDefaultRunNavigate("http://www.baz.com/")
- self.page_set.AddPageWithDefaultRunNavigate("http://www.foo.com/")
-
- @property
- def pages(self):
- return self.page_set.pages
-
- def CreateException(self):
- try:
- raise Exception('Intentional exception')
- except Exception:
- return sys.exc_info()
-
- def test_failures(self):
- results = NonPrintingPageTestResults()
- results.AddFailure(self.pages[0], self.CreateException())
- results.AddSuccess(self.pages[1])
- self.assertEquals(results.pages_that_had_failures,
- set([self.pages[0]]))
- self.assertEquals(results.successes,
- [self.pages[1].display_name])
-
- def test_errors(self):
- results = NonPrintingPageTestResults()
- results.AddError(self.pages[0], self.CreateException())
- results.AddSuccess(self.pages[1])
- self.assertEquals(results.pages_that_had_errors,
- set([self.pages[0]]))
- self.assertEquals(results.successes,
- [self.pages[1].display_name])
-
- def test_errors_and_failures(self):
- results = NonPrintingPageTestResults()
- results.AddError(self.pages[0], self.CreateException())
- results.AddError(self.pages[1], self.CreateException())
- results.AddSuccess(self.pages[2])
- self.assertEquals(results.pages_that_had_errors_or_failures,
- set([self.pages[0], self.pages[1]]))
- self.assertEquals(results.successes,
- [self.pages[2].display_name])
« no previous file with comments | « tools/telemetry/telemetry/page/page_test_results.py ('k') | tools/telemetry/telemetry/page/perf_tests_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698