ipwnponies/pytest-antilru

Limit scope of monkey patched lru_cache

Closed this issue · 0 comments

old_lru_cache = functools.lru_cache

The scope of monkey-patched lru_cache should be limit, to avoid any potential side effects. We only want to monkey patch test code, which is setup upon test collection. Once collection is done, reset it to be a good citizen and limit impact to other plugins.