detect-secrets icon indicating copy to clipboard operation
detect-secrets copied to clipboard

Fixe #611: audit fails with custom plugin

Open steamraven opened this issue 2 years ago • 4 comments

Clear a lru_cache when creating default_settings

steamraven avatar Sep 22 '22 21:09 steamraven

Appears the filters.common_filter_test.py makes use of testing.pugins.register_plugin. This contextmanager relies specifically on get_mapping_from_secret_type_to_class having an lru_cache. It actually inserts plugins into the cache. These of course get purged by my code.

I would say this is a problem with the test framework. I will try to find a solution

steamraven avatar Sep 22 '22 22:09 steamraven

@steamraven have you manually tested your branch besides running the test suite we have?

lorenzodb1 avatar Sep 22 '22 23:09 lorenzodb1

I have manually tested with the minimal plugin and baseline and it fixes the issue. I have and ran pytest with "time python -m pytest tests" . I have not been able to do a full test with tox due to environment setup issues.

It appears I am failing on autopep8 at the moment.

I can try to write up some full tests to test my issue, but that will take bit.

steamraven avatar Sep 22 '22 23:09 steamraven

That's okay, I'd rather have coverage of this. Thank you for your contribution!

lorenzodb1 avatar Sep 22 '22 23:09 lorenzodb1