Repository navigation
Conversation
…overflow clearing
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
I plan to expand this work further to achieve 100% test coverage for this module. Ready for your review and workflow approval! 🙏 |
BHUVANSH855
left a comment
There was a problem hiding this comment.
Sign CLA to get review process started.
|
Hello, mister @BHUVANSH855! I have already signed the CLA (confirmed on cla.python.org) and fixed the PR title format. However, the bots seem to be stuck and haven't updated the status checks yet. Could you please trigger the workflow run? Thank you! |
|
Who is Stepa? this is the account that made the changes in 1dc17d0: https://github.com/stepa |
picnixz
left a comment
There was a problem hiding this comment.
This PR is not enough. If you want to expand tests, please do it all at once rather than just a single test and please leave existing tests alone.
| "Mismatched file to shallow identical file compares as equal") | ||
|
|
||
| def test_cache_clear(self): | ||
| first_compare = filecmp.cmp(self.name, self.name_same, shallow=False) |
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| unittest.main() |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Summary
This PR adds missing unit tests for the
filecmpmodule to validate its caching behavior and automatic cache clearing mechanism.Changes
test_cache_clearenhancements to verify successful cache hits and ensure consistent results without computing file properties repeatedly.test_cmp_cache_clearing_on_overflowto ensure thatfilecmp._cachetriggers a reset and effectively limits its size when capacity exceeds 100 entries.Tested locally using
coverage, ensuring full test coverage of the internal cache conditional blocks.