Repository navigation
Repo checker: test that its answer matches the wheelgap CLI for every file format it reads - #198
Merged
Merged
Conversation
… file format it reads The checker promises to say what uvx wheelgap says on the same file, and hands people the command to compare with, but nothing tested that: driver.check() works its counts, rows and skipped list out itself, on a private API, and the pin moves with every release. tests/test_check_parity.py runs the pinned CLI and driver.check() on the same uv.lock, poetry.lock, pdm.lock, pylock.toml, requirements.txt, pyproject.toml, Pipfile.lock and pixi.lock and compares every status, count and skipped package. No network: the lockfiles run with --offline, the looked-up files against canned PyPI JSON served on 127.0.0.1. Co-Authored-By: Claude Fable 5.2 <[email protected]>
XDG_CACHE_HOME moves wheelgap's cache only on Linux; on macOS and Windows the looked-up tests saved fixture answers into the real cache. They pass --no-cache now. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Closes #189
The checker promises to say what
uvx wheelgapsays on the same file. This adds the test of that promise.What changed
tests/test_check_parity.py. For each file format the page reads, it runs the pinned CLI in a subprocess (sys.executable -m wheelgap <file> --json -p 3.13,3.14 -t linux-x86_64,linux-aarch64,musl-aarch64,win-arm64) anddriver.check()with the same Pythons and platforms, then compares:statuseswith the CLI'sresultsfor that package, on every target, and that a package has a row exactly when the CLI gives itsource,missingorunknownsomewhere;gaps,unknownandkeeplists;per_targetwith the counts over the CLI's packages, and with the CLI's ownsummary.per_target;packagesandskipped.uv.lock,poetry.lock,pdm.lock,pylock.toml) run with--offline. Each has a package with a wheel everywhere, one that issourceon some targets, one that ismissingon some, one limited by a marker (n/a), one no target installs, and the project or a local folder (skipped).requirements.txtwith an include,pyproject.toml,Pipfile.lock,pixi.lock) are covered too, although the issue was written before them. The CLI looks packages up on a server the test runs on 127.0.0.1 (WHEELGAP_INDEX_URL); the driver gets the same canned PyPI JSON for the lookupsneeds()names, keyed asworker.mjskeys it. These add a range that resolves to a different release per Python, a 404 (unknown), and private-index, git and path packages (skipped).pytestrun skips it when wheelgap isn't installed.Not compared, on purpose
requires-python, and aPipfile.lockor requirements file that names a second index: there the page and the CLI differ by design, andtest_check_driver.pycovers both.lookupflag on rows (it only decides which fixes are fetched).How it was tested
check.ymlcommand list locally. The driver step gives 36 passed, 6 skipped (the skips are the existing gap-wheel tests).HTTPS_PROXYpointed at a dead port anduvx --offline: still passes, so nothing leaves the machine.driver.check()on purpose, one change at a time. Each made the new file fail:driver.pyunknowncounted as a gapn/aread aswheelinstatusesn/acounted aswheelinper_targetmissingnot counted as a gapskippedemptiedpackagescounting every listed package🤖 Generated with Claude Code