test: cover ErrorFormatter classify, transport seam, and path edges#39
Closed
cursor[bot] wants to merge 1 commit into
Closed
test: cover ErrorFormatter classify, transport seam, and path edges#39cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Add regression tests for modules extracted in the Jul 16 scraper refactor: ErrorFormatter.classify categories, LiveBoardApi safe_get wiring, DownloadTask progress schema, redirect-loop hardening, and path builder helpers (limit_folder_length, catalog/empty-board session names). Co-authored-by: ringlet_fires5b <[email protected]>
Owner
|
Closing as superseded cleanup.
|
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
Nightly test-coverage run targeting the Jul 16 scraper refactor (
c7f46b8), which extractedErrorFormatter,LiveBoardApi,DownloadTask, and path helpers but left several new code paths without direct regression tests.Risky behavior now covered
safe_getwiring for thread/catalog fetch and streaming range requests (default download timeout)TooManyRedirectson redirect loops; retry whenLocationheader is missinglimit_folder_length, catalog/empty-board session namingTest files added/updated
tests/test_error_format.py(new)tests/test_transport_api.py(new)tests/test_signals.py(new)tests/test_session.py(redirect loop + missing Location)tests/test_paths.py(limit_folder_length + session base names)Why these tests materially reduce regression risk
The scraper refactor moved error classification and network access behind new seams. Failures there affect every download path (rate-limit backoff, user-facing messages, redirect security). Direct unit tests on the extracted modules catch regressions without standing up a full
FourChanScraperor GUI worker.Testing performed
uv run ruff checkon touched test filesuv run pytest tests/ -q --ignore=tests/test_gui.py— 97 passedSafety notes
Test-only change; no production behavior modified.
Screenshots
N/A — no UI changes.