Add Hypothesis property tests, fix download.py tag parsing#12
Merged
Conversation
…v dep group - Add tests/test_properties.py with 53 property-based tests covering normalize_name, filename roundtrip, import rewriting, wheel rename, PEP 723 parsing, CLI rename parsing, dependency patching, RECORD hashing, metadata updates, wheel tag parsing, rename merging, comment/TOML extraction, cache key generation, server config parsing/normalization/lookup, HTML generation safety, and filename rewrite roundtrips. - Fix parse_wheel_tags in download.py: replace fragile isdigit heuristic with count-from-end approach (same fix previously applied in rename.py). - Convert dev optional-dependency to [dependency-groups] dev group that includes server deps, so `uv sync` gets everything needed for testing. - Update INTERNAL_DOCS/testing.md and known-issues.md. Co-Authored-By: Claude Opus 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
tests/test_properties.pywith 53 property-based tests (Hypothesis) covering 20+ functions across all modules: rename, download, patch, run, server config, server HTML, and server stream.parse_wheel_tagsindownload.py— same build-tag heuristic bug previously fixed inrename.py(now counts from end instead of fragileisdigitcheck).devoptional-dependency to a[dependency-groups]dev group that includes theserverextras, souv syncinstalls everything needed for the full test suite.INTERNAL_DOCS/testing.mdandknown-issues.md.Test plan
uv run pytest tests/test_properties.py -v— 53 passeduv run pytest tests/ -x --tb=short— 295 passeduv run ruff check— all checks passed🤖 Generated with Claude Code