MCPcopy Index your code
hub / github.com/prometheus/client_python / test_labels

Method test_labels

tests/test_graphite_bridge.py:49–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47 self.assertEqual(b'g 1.0 1434898897\n', self.data)
48
49 def test_labels(self):
50 labels = Gauge('labels', 'help', ['a', 'b'], registry=self.registry)
51 labels.labels('c', 'd').inc()
52
53 self.gb.push()
54 self.t.join()
55
56 self.assertEqual(b'labels.a.c.b.d 1.0 1434898897\n', self.data)
57
58 def test_labels_tags(self):
59 self._use_tags()

Callers

nothing calls this directly

Calls 5

GaugeClass · 0.90
joinMethod · 0.80
incMethod · 0.45
labelsMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected