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

Method test_info

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

Source from the content-addressed store, hash-verified

372""", generate_latest(self.registry, version="1.0.0"))
373
374 def test_info(self) -> None:
375 i = Info('ii', 'A info', ['a', 'b'], registry=self.registry)
376 i.labels('c', 'd').info({'foo': 'bar'})
377 self.assertEqual(b"""# HELP ii A info
378# TYPE ii info
379ii_info{a="c",b="d",foo="bar"} 1.0
380# EOF
381""", generate_latest(self.registry, version="2.0.0"))
382
383 def test_enum(self) -> None:
384 i = Enum('ee', 'An enum', ['a', 'b'], registry=self.registry, states=['foo', 'bar'])

Callers

nothing calls this directly

Calls 4

InfoClass · 0.90
generate_latestFunction · 0.90
infoMethod · 0.80
labelsMethod · 0.45

Tested by

no test coverage detected