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

Method test_unregister_works

tests/test_core.py:942–947  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

940 self.assertRaises(ValueError, Gauge, 'i_info', 'help', registry=registry)
941
942 def test_unregister_works(self):
943 registry = CollectorRegistry()
944 s = Summary('s', 'help', registry=registry)
945 self.assertRaises(ValueError, Gauge, 's_count', 'help', registry=registry)
946 registry.unregister(s)
947 Gauge('s_count', 'help', registry=registry)
948
949 def custom_collector(self, metric_family, registry):
950 class CustomCollector:

Callers

nothing calls this directly

Calls 4

unregisterMethod · 0.95
CollectorRegistryClass · 0.85
SummaryClass · 0.85
GaugeClass · 0.85

Tested by

no test coverage detected