-
Notifications
You must be signed in to change notification settings - Fork 64
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
Order independent kwargs handling during cache key calculation #133
Order independent kwargs handling during cache key calculation #133
Conversation
Nice! I've read the code and test - looks good. The tests are now running. Let's wait and make sure they all pass. |
There are some test errors, but I do not quite understand them. Some are permission errors. Some tests failed in my computer even with unmodified code. As far as I can tell, my modifications did not introduce new errors - tests that succeeded before, succeeded after modifications as well. |
I see there is some blank line at the end of file formatting error. I will try to adjust that. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #133 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 508 510 +2
Branches 88 88
=========================================
+ Hits 508 510 +2
Continue to review full report in Codecov by Sentry.
|
Looks like the "blank line at the end of file" formatting failure is fixed now. The remaining test failures seem to be related to some connection error. I guess that is something I cannot control. |
Please see PR #134 . All tests pass when testing an actual MongoDB server, but test coverage dropped under a 100%. See details in codecov: Please add a test to cover these lines. |
Related to issue #132
Added sorting of kwargs so that changing the ordering will not invalidate the cache.
Added test for this feature.
Note: The keyword arguments are sorted only for cache key calculation. The actual function is still called with unordered arguments. The rationale for the latter is that if somebody is debugging their code then they might be confused if the arguments they see as their function input are in a different order than expected.