test: assert expired key directly now that time-machine controls clock#103
test: assert expired key directly now that time-machine controls clock#103
Conversation
Removes workaround for file handle bug — with time-machine shifting the clock, backend.get() correctly returns None for expired keys. Closes #95.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe test ChangesTTL Expiry Test Simplification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 3/5 reviews remaining, refill in 18 minutes and 29 seconds. Comment |
Summary
test_ttl_enforcedthat avoided reading expired keys directly due to a file handle bug in FileBackendtime-machinecontrolling the clock (added in test: eliminate flaky time.sleep() tests with time-machine #94),backend.get("temporary")correctly returnsNoneafter advancing past TTLTest plan
test_ttl_enforcedpasses locally (verified 5/5 runs)Summary by CodeRabbit
Release Notes
No user-facing changes in this release. This update includes internal test improvements to verify existing functionality.