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

Method test_info

tests/test_exposition.py:155–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153""", generate_latest(self.registry))
154
155 def test_info(self):
156 i = Info('ii', 'A info', ['a', 'b'], registry=self.registry)
157 i.labels('c', 'd').info({'foo': 'bar'})
158 self.assertEqual(b'# HELP ii_info A info\n# TYPE ii_info gauge\nii_info{a="c",b="d",foo="bar"} 1.0\n',
159 generate_latest(self.registry))
160
161 def test_enum(self):
162 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