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

Method test_sanitizing

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

Source from the content-addressed store, hash-verified

85 self.assertEqual(b'pre.fix.labels;a=c;b=d 1.0 1434898897\n', self.data)
86
87 def test_sanitizing(self):
88 labels = Gauge('labels', 'help', ['a'], registry=self.registry)
89 labels.labels('c.:8').inc()
90
91 self.gb.push()
92 self.t.join()
93
94 self.assertEqual(b'labels.a.c__8 1.0 1434898897\n', self.data)
95
96 def test_sanitizing_tags(self):
97 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