New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: enable cache for pytest-ruff >= 0.3.0 #482
Conversation
ruff had a change in behavior that is not currently playing nice with pytest-ruff. Pin down to 0.2.x for now.
I'm going to take another look. I think the real error is that we're disabling pytest's cache provider, and that's causing pytest-ruff to fail because the newer versions rely on being able to store and retrieve items from the cache. I'll update this PR shortly after I make the same change over in https://github.com/git-cola/git-cola/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing that really should be fixed is the lack of a PR link in CHANGES.rst, but otherwise looks basically good to merge!
Newer versions of pytest-ruff require a cache provider. Remove the no:cacheprovider flags to get pytest-ruff working again.
Narrow the pytest discovery to just the jsonpickle and tests directories. This speeds up pytest because it spends less time walking the directory structure looking for non-existent tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks for the detailed answer about not using a cache provider!
Newer versions of pytest-ruff require a cache provider.
Remove the no:cacheprovider flags to get pytest-ruff working again.