test: 17 tests for load_image, handle_txt, handle_png, create_downsampled_image#30
Open
hai-pilgrim wants to merge 1 commit intomarksverdhei:mainfrom
Open
test: 17 tests for load_image, handle_txt, handle_png, create_downsampled_image#30hai-pilgrim wants to merge 1 commit intomarksverdhei:mainfrom
hai-pilgrim wants to merge 1 commit intomarksverdhei:mainfrom
Conversation
… handle_png, create_downsampled_image) load_image: local file, missing file → None, URL with mocked requests, wrong content-type → None. handle_txt: writes content, non-txt extension warns, .txt no warning, creates new file. handle_png: saves file, prints success, invalid path → error to stderr (no raise). create_downsampled_image: output size, even kernel error, kernel > grid error, zero grid error, PIL return type, geometric median type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
spritegrid/main.pyutility functions (previously uncovered)load_image: local file, missing file → None, URL loading with mocked requests, wrong content-type → Nonehandle_txt: writes content to file, non-.txtextension prints Warning,.txtextension no warning, creates file if not existshandle_png: saves PIL image, prints success message, invalid path doesn't raise (prints Error to stderr)create_downsampled_image: output size matches(num_cells_w, num_cells_h), even kernel raises ValueError, kernel larger than grid raises, zero grid width raises, returns PIL Image,median_type="geometric"worksTest plan
uv run pytest tests/test_main_utils.py -q🤖 Generated with Claude Code