scoutapp/scout_apm_python

Add context manager to temporarily override configuration options

adamchainz opened this issue · 0 comments

Tests currently use a lot of try/finally clauses to undo the changes they make to configuration:

try:
    ...
finally:
    Config.reset_all()

It would be nice to replace this with a context manager that allows temporary configuration overrides, to make tests a bit more ergonomic.