Skip to content

Add pytest coverage for os-release, distro-release, lsb and version handling (35 tests) - #387

Open
wxs-lang wants to merge 4 commits into
python-distro:masterfrom
wxs-lang:master
Open

wxs-lang wants to merge 4 commits into
python-distro:masterfrom
wxs-lang:master

Conversation

@wxs-lang

Copy link
Copy Markdown

Upstream is built around per-distribution resource folders, so there's no compact fixture-driven coverage of the parsing rules themselves — quoting, comments, codename derivation, id normalisation, the distro-release file-name rule, the lsb fallback and the best-version algorithm. This adds 35 tests in three new files under tests/, every instance built from a temporary file (or a temporary root dir / fake lsb_release command), so no test depends on the host distribution. No production code changed. Quirks are pinned as-is with comments — a distro-release file's id comes from its file name, name(pretty=True) without PRETTY_NAME can produce a leading space, and version(best=True) picks the most-dotted candidate.

Checked locally: new files pass (35 passed), upstream suite still green (281 passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant