mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #154] [MERGED] [tests] Cover post cache round-trip and content filters #158
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/154
Author: @Glitchy-Sheep
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:test/cache-and-filter-units📝 Commits (1)
c48b6a9test: Cover post cache round-trip and content filters📊 Changes
2 files changed (+234 additions, -0 deletions)
View changed files
➕
test/unit/post_caching/post_cache_test.py(+118 -0)➕
test/unit/use_cases/should_execute_test.py(+116 -0)📄 Description
[tests] Cover post cache round-trip and content filters
Summary
Second PR of the test safety-net stage (stacked on #153, merge that one first). The cache and the content-filter gate are exactly what the upcoming layering refactoring will move around - this pins their behavior first. Coverage of
post_cache.pygoes from 31% to 97%, total from 69% to 73%.What is pinned
SQLite post cache (9 tests on
tmp_path):updated_at) invalidates every partclean-cachereally forgets everything and the database stays writableContent-filter gate (10 tests):
Known bug, documented as strict xfail
A cache file that is not SQLite at all (garbage bytes) crashes startup with
DatabaseError: migrations in__init__run before the corruption check, so the reinit path never gets a chance. The test asserts the desired contract (reset instead of crash) and is markedxfail(strict=True): today the run stays green, and the future fix will flip the test red until the mark is removed - a ready-made regression test.Verification
task cigreen: lint, format, pyright, 147 passed + 1 xfailed, buildtask test:cov:post_cache.py97%,models.py91%, TOTAL 73%Notes
ci/skip-changelog)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.