Index: tools/telemetry/telemetry/page/page_measurement_results_unittest.py |
=================================================================== |
--- tools/telemetry/telemetry/page/page_measurement_results_unittest.py (revision 222891) |
+++ tools/telemetry/telemetry/page/page_measurement_results_unittest.py (working copy) |
@@ -4,10 +4,16 @@ |
import os |
import unittest |
+from telemetry.core import util |
from telemetry.page import page_measurement_results |
from telemetry.page import page_set |
-from telemetry.page import perf_tests_helper |
+# Get build scripts into our path. |
+util.AddDirToPythonPath(util.GetChromiumSrcDir(), 'build', 'util', 'lib') |
+from common import perf_result_data_type # pylint: disable=F0401 |
+from common import perf_tests_results_helper # pylint: disable=F0401 |
+ |
+ |
def _MakePageSet(): |
return page_set.PageSet.FromDict({ |
"description": "hello", |
@@ -33,7 +39,8 @@ |
self.results = [] |
def _PrintPerfResult(self, *args): |
- res = perf_tests_helper.PrintPerfResult(*args, print_to_stdout=False) |
+ res = perf_tests_results_helper.PrintPerfResult(*args, |
+ print_to_stdout=False) |
self.results.append(res) |
class PageMeasurementResultsTest(unittest.TestCase): |
@@ -84,7 +91,9 @@ |
measurement_results.WillMeasurePage(test_page_set.pages[1]) |
self.assertRaises( |
AssertionError, |
- lambda: measurement_results.Add('a', 'seconds', 3, data_type='histogram')) |
+ lambda: measurement_results.Add( |
+ 'a', 'seconds', 3, |
+ data_type=perf_result_data_type.HISTOGRAM)) |
def test_basic_summary_all_pages_fail(self): |
"""If all pages fail, no summary is printed.""" |