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

Unified Diff: infra_libs/ts_mon/common/test/metrics_test.py

Issue 2109393002: Make test_net_info a bit more robust. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add tests Created 4 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
« no previous file with comments | « infra_libs/ts_mon/common/test/metric_store_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/ts_mon/common/test/metrics_test.py
diff --git a/infra_libs/ts_mon/common/test/metrics_test.py b/infra_libs/ts_mon/common/test/metrics_test.py
index b064caf0a92849cd07992c491b66e7d300c7a51c..a09795d63afa2a5b42f006352600dd4c4b242625 100644
--- a/infra_libs/ts_mon/common/test/metrics_test.py
+++ b/infra_libs/ts_mon/common/test/metrics_test.py
@@ -230,6 +230,17 @@ class CounterMetricTest(TestBase):
m = metrics.CounterMetric('test')
self.assertTrue(m.is_cumulative())
+ def test_get_all(self):
+ m = metrics.CounterMetric('test')
+ m.increment()
+ m.increment({'foo': 'bar'})
+ m.increment({'foo': 'baz', 'moo': 'wibble'})
+ self.assertEqual([
+ ((), 1),
+ ((('foo', 'bar'),), 1),
+ ((('foo', 'baz'), ('moo', 'wibble')), 1),
+ ], sorted(m.get_all()))
+
class GaugeMetricTest(TestBase):
« no previous file with comments | « infra_libs/ts_mon/common/test/metric_store_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698