MCPcopy Create free account
hub / github.com/prometheus/client_python / test_simple_gauge

Method test_simple_gauge

tests/openmetrics/test_parser.py:50–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 self.assertEqual([metric], list(families))
49
50 def test_simple_gauge(self):
51 families = text_string_to_metric_families("""# TYPE a gauge
52# HELP a help
53a 1
54# EOF
55""")
56 self.assertEqual([GaugeMetricFamily("a", "help", value=1)], list(families))
57
58 def test_float_gauge(self):
59 families = text_string_to_metric_families("""# TYPE a gauge

Callers

nothing calls this directly

Calls 2

GaugeMetricFamilyClass · 0.90

Tested by

no test coverage detected