trallnag / prometheus-fastapi-instrumentator

Instrument your FastAPI with Prometheus metrics.
ISC License
948 stars 84 forks source link

Any reason why the very similar function `reset_prometheus` is copy&pasted multiple times in your tests? #309

Open petarmaric opened 5 months ago

petarmaric commented 5 months ago

Let's say that the canonical version is here: https://github.com/trallnag/prometheus-fastapi-instrumentator/blob/c0813def118754db109a435d154351a680eede8e/tests/helpers/utils.py#L16-L28

I see pretty much the same code again in other test files, such as:

FaridFArab commented 5 months ago

It needs to be refactored. I will work on it. Thanks for your announcing.