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

Side by Side Diff: tools/telemetry/telemetry/value/histogram_unittest.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import os 4 import os
5 import unittest 5 import unittest
6 6
7 from telemetry import page as page_module 7 from telemetry import page as page_module
8 from telemetry.page import page_set
8 from telemetry import value 9 from telemetry import value
9 from telemetry.page import page_set
10 from telemetry.value import histogram as histogram_module 10 from telemetry.value import histogram as histogram_module
11 11
12 12
13 class TestBase(unittest.TestCase): 13 class TestBase(unittest.TestCase):
14 def setUp(self): 14 def setUp(self):
15 ps = page_set.PageSet(file_path=os.path.dirname(__file__)) 15 ps = page_set.PageSet(file_path=os.path.dirname(__file__))
16 ps.AddUserStory(page_module.Page("http://www.bar.com/", ps, ps.base_dir)) 16 ps.AddUserStory(page_module.Page("http://www.bar.com/", ps, ps.base_dir))
17 ps.AddUserStory(page_module.Page("http://www.baz.com/", ps, ps.base_dir)) 17 ps.AddUserStory(page_module.Page("http://www.baz.com/", ps, ps.base_dir))
18 ps.AddUserStory(page_module.Page("http://www.foo.com/", ps, ps.base_dir)) 18 ps.AddUserStory(page_module.Page("http://www.foo.com/", ps, ps.base_dir))
19 self.page_set = ps 19 self.page_set = ps
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 'name': 'x', 73 'name': 'x',
74 'units': 'counts', 74 'units': 'counts',
75 'buckets': [{'low': 1, 'high': 2, 'count': 1}] 75 'buckets': [{'low': 1, 'high': 2, 'count': 1}]
76 } 76 }
77 v = value.Value.FromDict(d, {}) 77 v = value.Value.FromDict(d, {})
78 78
79 self.assertTrue(isinstance(v, histogram_module.HistogramValue)) 79 self.assertTrue(isinstance(v, histogram_module.HistogramValue))
80 self.assertEquals( 80 self.assertEquals(
81 ['{"buckets": [{"low": 1, "high": 2, "count": 1}]}'], 81 ['{"buckets": [{"low": 1, "high": 2, "count": 1}]}'],
82 v.GetBuildbotValue()) 82 v.GetBuildbotValue())
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/value/histogram.py ('k') | tools/telemetry/telemetry/value/list_of_scalar_values_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698