test: unit test suite for distribution-consistency checker (issue #8, slice 1)#12
Merged
Conversation
wesleysimplicio
pushed a commit
that referenced
this pull request
Jul 14, 2026
Brings in PR #12 (unit test suite, CONTRIBUTING.md, testing-strategy docs, pyproject.toml, requirements-dev.txt, tests.yml workflow) alongside the existing CI quality-gate workflow from this branch. .gitignore merged to keep entries from both sides.
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 #8
Summary
This repo is the public distribution repo for
simplicio(committed release binaries + npm/pypi/Homebrew packaging + install scripts), not the agent's Rust source — there is noCargo.toml/*.rshere, socargo test/check/builddo not apply. The testable "pacote principal" reachable from this repo today is its own tooling, starting with the highest-risk piece:scripts/verify_distribution_consistency.py, the packaging/version-drift auditor.This PR delivers the first real, useful slice of the testing epic:
tests/unit/test_verify_distribution_consistency.py+tests/unit/conftest.py(RepoBuilderfixture): covers every finding branch of the checker — happy path, eachERRORcase (missing branch-policy text,/main/install references,version.txt/manifest mismatch), eachWARNcase (wrapper version drift, ecosystem-doc drift, stale/unparseable beta date, contradictory beta copy), and the parser helpers' error paths (malformed Formula/pyproject version strings).date.today()is frozen viamonkeypatchin every beta-date test; every test builds its own throwaway repo tree under pytest'stmp_path; no network access; no execution-order dependence.--cov-fail-under=85, clearing both the 85% project-wide and 90% critical-area thresholds from the issue for this module..github/workflows/tests.ymlrunspytest tests/unit --cov=scripts --cov-fail-under=85on pushes/PRs touchingscripts//tests/, independent of the existing binary-release workflow.README.mdandCONTRIBUTING.mdnow state the official test command;docs/testing-strategy.mdrecords what's covered, what's explicitly out of scope, and the remaining follow-up plan.Acceptance criteria from issue #8 addressed by this slice
tests/unit, nomenclatura e comando oficial de testes definidosRepoBuilderemconftest.py)docs/testing-strategy.mdThis epic is intentionally larger than one PR (per the issue's own step-by-step plan).
docs/testing-strategy.mdlists the prioritized next slices (npm installer tests with fs/network fakes, install-script tests, project-wide branch coverage roll-up) so the epic can be tracked to completion across multiple PRs.Test plan
pip install -r requirements-dev.txt && python -m pytest tests/unit -v --cov=scripts --cov-report=term-missing --cov-fail-under=85— 20 passed, 98.04% coverage, gate passescargo test/check/build(not applicable — no Rust source in this repo)