1# Copyright (c) 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import unittest
6
7from tracing.metrics import discover
8
9class MetricsDiscoverUnittest(unittest.TestCase):
10  def testMetricsDiscoverEmpty(self):
11    self.assertFalse(discover.DiscoverMetrics([]))
12
13  def testMetricsDiscoverNonEmpty(self):
14    self.assertEquals(['sampleMetric'], discover.DiscoverMetrics(
15        ['/tracing/metrics/sample_metric.html']))
16
17  def testMetricsDiscoverMultipleMetrics(self):
18    self.assertGreater(
19        len(discover.DiscoverMetrics(
20            ['/tracing/metrics/all_metrics.html'])), 1)
21