| Index: tools/telemetry/telemetry/value/histogram_unittest.py
|
| diff --git a/tools/telemetry/telemetry/value/histogram_unittest.py b/tools/telemetry/telemetry/value/histogram_unittest.py
|
| index abb0e284a41a7359b74b2a6cbee0722f53feadd3..e8cf44d48ea44c79f4b6ace9dae443dfeba4233d 100644
|
| --- a/tools/telemetry/telemetry/value/histogram_unittest.py
|
| +++ b/tools/telemetry/telemetry/value/histogram_unittest.py
|
| @@ -8,6 +8,8 @@ from telemetry import page as page_module
|
| from telemetry import value
|
| from telemetry.page import page_set
|
| from telemetry.value import histogram as histogram_module
|
| +from telemetry.value import improvement_direction
|
| +from telemetry.value import summarizable
|
|
|
|
|
| class TestBase(unittest.TestCase):
|
| @@ -28,7 +30,7 @@ class ValueTest(TestBase):
|
| histogram = histogram_module.HistogramValue(
|
| page0, 'x', 'counts',
|
| raw_value_json='{"buckets": [{"low": 1, "high": 2, "count": 1}]}',
|
| - important=False)
|
| + important=False, improvement_direction=improvement_direction.UP)
|
| self.assertEquals(
|
| ['{"buckets": [{"low": 1, "high": 2, "count": 1}]}'],
|
| histogram.GetBuildbotValue())
|
| @@ -60,7 +62,7 @@ class ValueTest(TestBase):
|
| histogram = histogram_module.HistogramValue(
|
| None, 'x', 'counts',
|
| raw_value_json='{"buckets": [{"low": 1, "high": 2, "count": 1}]}',
|
| - important=False)
|
| + important=False, improvement_direction=improvement_direction.DOWN)
|
| d = histogram.AsDictWithoutBaseClassEntries()
|
|
|
| self.assertEquals(['buckets'], d.keys())
|
| @@ -72,7 +74,8 @@ class ValueTest(TestBase):
|
| 'type': 'histogram',
|
| 'name': 'x',
|
| 'units': 'counts',
|
| - 'buckets': [{'low': 1, 'high': 2, 'count': 1}]
|
| + 'buckets': [{'low': 1, 'high': 2, 'count': 1}],
|
| + 'improvement_direction': 'down',
|
| }
|
| v = value.Value.FromDict(d, {})
|
|
|
| @@ -80,3 +83,4 @@ class ValueTest(TestBase):
|
| self.assertEquals(
|
| ['{"buckets": [{"low": 1, "high": 2, "count": 1}]}'],
|
| v.GetBuildbotValue())
|
| + self.assertEquals(improvement_direction.DOWN, v.improvement_direction)
|
|
|