test: cover ErrorFormatter classify, transport seam, and path/session edges#40
Closed
cursor[bot] wants to merge 1 commit into
Closed
test: cover ErrorFormatter classify, transport seam, and path/session edges#40cursor[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 classification, DownloadTask schema, LiveBoardApi safe_get wiring, redirect-loop/missing-Location session handling, and PathBuilder catalog/empty-board naming plus limit_folder_length truncation. 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
Adds regression tests for modules extracted in the Jul 16 scraper refactor (
c7f46b8). These paths handle network error classification, download progress payloads, transport seam wiring, redirect hardening, and path-builder edge cases — all high-blast-radius download flows with no dedicated coverage onmain.Risky behavior now covered
safe_getwiring for thread/catalog fetch and streaming range requests (default download timeout)TooManyRedirects) and missingLocationheader fallbackChanged files
tests/test_error_format.pytests/test_signals.pytests/test_transport_api.pytests/test_session.pytests/test_paths.pyWhy these tests materially reduce regression risk
The Jul 16 refactor moved error handling, retry policy, chunking, and transport behind new seams. Without tests, a rename or signature drift in
ErrorFormatterorLiveBoardApicould silently break user-facing error messages or bypass redirect allowlisting. These tests lock the contracts the GUI and workers depend on.Testing performed
uv run pytest tests/ -q --ignore=tests/test_gui.py— 97 passeduv run ruff check .Safety notes
Test-only change; no production behavior modified.
Screenshots
N/A — no UI changes.