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

Method test_gauge

tests/openmetrics/test_exposition.py:72–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70 generate_latest(self.registry))
71
72 def test_gauge(self) -> None:
73 g = Gauge('gg', 'A gauge', registry=self.registry)
74 g.set(17)
75 self.assertEqual(b'# HELP gg A gauge\n# TYPE gg gauge\ngg 17.0\n# EOF\n', generate_latest(self.registry))
76
77 def test_summary(self) -> None:
78 s = Summary('ss', 'A summary', ['a', 'b'], registry=self.registry)

Callers

nothing calls this directly

Calls 3

setMethod · 0.95
GaugeClass · 0.90
generate_latestFunction · 0.90

Tested by

no test coverage detected