MCPcopy Create free account
hub / github.com/prometheus/client_python / test_escape_label_name

Function test_escape_label_name

tests/openmetrics/test_exposition.py:603–613  ·  view source on GitHub ↗
(scenario)

Source from the content-addressed store, hash-verified

601 },
602])
603def test_escape_label_name(scenario):
604 input = scenario["input"]
605
606 got = escape_label_name(input, UNDERSCORES)
607 assert got == scenario["expectedUnderscores"], f"[{scenario['name']}] Underscore escaping failed"
608
609 got = escape_label_name(input, DOTS)
610 assert got == scenario["expectedDots"], f"[{scenario['name']}] Dots escaping failed"
611
612 got = escape_label_name(input, VALUES)
613 assert got == scenario["expectedValue"], f"[{scenario['name']}] Value encoding failed"
614
615
616if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

escape_label_nameFunction · 0.90

Tested by

no test coverage detected