If lru_cache is not found, this plugin will make pytest immediately terminate.
This means the user is not even using lru_cache. This can be an unnecessary installation of this plugin or a test environment misconfiguration.
This doesn't apply to python 3, functools.lru_cache is in the stdlib and always available.
Proposed Solution
We should use pytest calls to set a failure, so that pytest can report it as such.
Note: If there's a request for warning instead of failing, we can make the plugin noop. Probably if a package is using some python testing template but doesn't need this plugin. But this seems like supporting workaround instead, not in the scope of this ticket.
https://github.com/ipwnponies/pytest-antilru/blob/a78af3da55c6b71e1c2172c3368c70f6f7d93713/pytest_antilru/main.py#L18
What's wrong
If
lru_cache
is not found, this plugin will make pytest immediately terminate.This means the user is not even using
lru_cache
. This can be an unnecessary installation of this plugin or a test environment misconfiguration.This doesn't apply to python 3,
functools.lru_cache
is in thestdlib
and always available.Proposed Solution
We should use pytest calls to set a failure, so that pytest can report it as such.
Note: If there's a request for warning instead of failing, we can make the plugin noop. Probably if a package is using some python testing template but doesn't need this plugin. But this seems like supporting workaround instead, not in the scope of this ticket.