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

Method assert_metrics

tests/test_aiohttp.py:52–61  ·  view source on GitHub ↗
(
        self,
        output: str,
        metric_name: str,
        help_text: str,
        increments: int,
    )

Source from the content-addressed store, hash-verified

50 c.inc()
51
52 def assert_metrics(
53 self,
54 output: str,
55 metric_name: str,
56 help_text: str,
57 increments: int,
58 ) -> None:
59 self.assertIn("# HELP " + metric_name + "_total " + help_text + "\n", output)
60 self.assertIn("# TYPE " + metric_name + "_total counter\n", output)
61 self.assertIn(metric_name + "_total " + str(increments) + ".0\n", output)
62
63 def assert_not_metrics(
64 self,

Callers 4

assert_outputsMethod · 0.95
test_gzipMethod · 0.95
test_gzip_disabledMethod · 0.95
test_qs_parsingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected