The new unit tests verify ordering by line index, but there's no test that feeds the collect() output through a real Prometheus text-format parser (e.g. prometheus_client.exposition or the openmetrics Python library). Adding one integration-style test that round-trips through a parser would catch any subtle formatting violations (e.g. missing newline, stray whitespace) that the line-index approach can miss.
Follow-up from #155
The new unit tests verify ordering by line index, but there's no test that feeds the collect() output through a real Prometheus text-format parser (e.g. prometheus_client.exposition or the openmetrics Python library). Adding one integration-style test that round-trips through a parser would catch any subtle formatting violations (e.g. missing newline, stray whitespace) that the line-index approach can miss.
Follow-up from #155