prometheus-fastapi-instrumentator
prometheus-fastapi-instrumentator copied to clipboard
Any reason why the very similar function `reset_prometheus` is copy&pasted multiple times in your tests?
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:
- https://github.com/trallnag/prometheus-fastapi-instrumentator/blob/c0813def118754db109a435d154351a680eede8e/tests/test_expose.py#L61-L74
- https://github.com/trallnag/prometheus-fastapi-instrumentator/blob/c0813def118754db109a435d154351a680eede8e/tests/test_instrumentation.py#L26-L39
- https://github.com/trallnag/prometheus-fastapi-instrumentator/blob/c0813def118754db109a435d154351a680eede8e/tests/test_instrumentator_expose.py#L15-L28
It needs to be refactored. I will work on it. Thanks for your announcing.