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

Method test_simple_histogram

tests/test_parser.py:74–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 self.assertEqualMetrics([metric_family], list(families))
73
74 def test_simple_histogram(self):
75 families = text_string_to_metric_families("""# TYPE a histogram
76# HELP a help
77a_bucket{le="1"} 0
78a_bucket{le="+Inf"} 3
79a_count 3
80a_sum 2
81""")
82 self.assertEqualMetrics([HistogramMetricFamily("a", "help", sum_value=2, buckets=[("1", 0.0), ("+Inf", 3.0)])],
83 list(families))
84
85 def test_no_metadata(self):
86 families = text_string_to_metric_families("""a 1

Callers

nothing calls this directly

Calls 3

assertEqualMetricsMethod · 0.95

Tested by

no test coverage detected