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

Method assert_metrics

tests/test_asgi.py:87–90  ·  view source on GitHub ↗
(self, output, metric_name, help_text, increments)

Source from the content-addressed store, hash-verified

85 c.inc()
86
87 def assert_metrics(self, output, metric_name, help_text, increments):
88 self.assertIn("# HELP " + metric_name + "_total " + help_text + "\n", output)
89 self.assertIn("# TYPE " + metric_name + "_total counter\n", output)
90 self.assertIn(metric_name + "_total " + str(increments) + ".0\n", output)
91
92 def assert_not_metrics(self, output, metric_name, help_text, increments):
93 self.assertNotIn("# HELP " + metric_name + "_total " + help_text + "\n", output)

Callers 3

assert_outputsMethod · 0.95
test_qs_parsingMethod · 0.95
test_qs_parsing_multiMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected