Repository navigation
test: cover SimpleCache and AuthHandler serialization - #187
Merged
Merged
Conversation
- cache.py: 40% -> 100% (set/get, expiry, delete, cull, locking) - auth.py: 65% -> 91% (file/dict serialization roundtrips, token_factory, guard errors, OAuthRequest dict-like interface, request-token fetch path) - All network interactions are mocked; no live Flickr calls
beaufour
force-pushed
the
test/raise-coverage-auth-cache
branch
from
October 27, 2026 12:53
7a8e685 to
8fa3fcf
Compare
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #183, which showed
cache.pyat 40% andauth.pyat 65% coverage. Adds tests for the untested pure-logic paths, all network interactions mocked:cache.py40% → 100%: set/get/default, expiry purge, delete (incl. silent missing key),has_key/__contains__, culling (incl. auto-cull when full), and the reentrant@lockingbehavior.auth.py65% → 91%:tofile/save/write/load/fromfileroundtrips (with and without API keys),todict/fromdict(access + request tokens),token_factory, guard errors (AuthHandlerError/ValueError), the request-token fetch path (requests.postmocked), andOAuthRequest's dict-like interface incl.complete_parameters.Local: 323 tests pass (was 291), branch coverage 80% → 84%.
Test Plan
uv run pytest --cov=flickr_apilocallyAutomated prep by Hermes maintainer.