(self)
| 40 | self.registry.register(CustomCollector()) |
| 41 | |
| 42 | def test_counter(self): |
| 43 | c = Counter('cc', 'A counter', registry=self.registry) |
| 44 | c.inc() |
| 45 | self.assertEqual(b"""# HELP cc_total A counter |
| 46 | # TYPE cc_total counter |
| 47 | cc_total 1.0 |
| 48 | # HELP cc_created A counter |
| 49 | # TYPE cc_created gauge |
| 50 | cc_created 123.456 |
| 51 | """, generate_latest(self.registry, openmetrics.ALLOWUTF8)) |
| 52 | |
| 53 | def test_counter_utf8(self): |
| 54 | c = Counter('utf8.cc', 'A counter', registry=self.registry) |
nothing calls this directly
no test coverage detected