tests.test_pyproject module¶
Consistency checks tying the test matrix to the declared dependencies.
The click version axis of the test matrix is the one dependency whose whole
supported range is exercised release-by-release (a patch can change behavior
mid-stream). These tests keep that axis in sync with the click dependency
specifier, so a drift, like a new Click release or a raised floor, fails CI
instead of silently rotting.
- tests.test_pyproject.PYPROJECT = PosixPath('/home/runner/work/click-extra/click-extra/pyproject.toml')¶
Path to the project’s
pyproject.toml, relative to this test file.
- tests.test_pyproject.SENTINELS = ('released', 'stable', 'main')¶
Moving-reference values of the
click-versionaxis: the lockfile-resolved release, and Click’sstableandmaindevelopment branches. Everything else in the axis is a pinned release number.
- tests.test_pyproject.UV_LOCK = PosixPath('/home/runner/work/click-extra/click-extra/uv.lock')¶
Path to the project’s
uv.lock, which holds the Clickreleasedcells run.
- tests.test_pyproject.load_click_matrix()[source]¶
Read the Click setup from
pyproject.toml.The
click-versionaxis is spread across the forward-lookingtest-matrix.full-includerows (the pinned releases and thestable/mainsentinels) and thereleaseddefault declared intest-matrix.include.
- tests.test_pyproject.stable_pypi_versions(package)[source]¶
Return all non-yanked, non-prerelease versions of
packageon PyPI.
- tests.test_pyproject.locked_versions(package)[source]¶
Return the versions of
packagethatuv.lockpins.A
releasedcell installs from the lock withuv run --frozen, so it runs this version, not the newest one on PyPI: the cooldown keeps a new release out of the lock for a week.
- tests.test_pyproject.test_click_floor_is_pinned_and_sentinels_present()[source]¶
The matrix floor stays in sync with the dependency floor (hermetic).
The lowest pinned
click-versionmust equal the lower bound of theclickspecifier, so raising or lowering the dependency floor without updating the matrix (or vice versa) fails here. Runs offline, unlike the PyPI cross-check below.
- tests.test_pyproject.test_click_matrix_matches_authorized_releases()[source]¶
The pinned releases match exactly the Click releases the specifier allows.
Every release allowed by the
clickspecifier must be referenced in the matrix: the locked one through thereleasedsentinel, every other one by an explicit pin. This asserts the set equality in both directions:a missing pin means a Click release that no cell runs, like a new release that the cooldown still keeps out of
uv.lock;a stale pin means a pinned version is no longer an authorized release (the floor was raised past it, or the release was yanked).
Either way, the matrix needs an edit, and this is the signal. There is no exemption list: a release the suite cannot run on gets its own answer at the moment it appears, whether that is a floor bump past it or a hole opened here on purpose.
- tests.test_pyproject.test_nuitka_includes_every_lazy_subcommand_module()[source]¶
A Nuitka build bundles the module of each lazily mounted subcommand.
Nuitka follows
importstatements only, while a lazy subcommand is imported from a string: a module missing here ships a binary whose subcommand fails.