Skip to content

Establish the pytest harness and migrate press selftest into reusable tests #78

Description

@clintecker

Problem

press selftest is a valuable installed-package smoke command, but its monolithic assertions do not provide isolated discovery, parametrization, fixtures, property tests, or reusable contract results. The accumulated-trust program needs a conventional test runner and shared support package before the higher test layers can be enforced.

Scope

Bootstrap the test harness without removing the portable press selftest command.

Acceptance criteria

  • Add pytest and coverage tooling to the development dependencies with strict marker/config validation and importlib import mode.
  • Establish tests/unit, tests/contracts, tests/damage, tests/graph, tests/integration, tests/e2e, and tests/support.
  • Move or wrap current selftest assertions as independently selectable tests without duplicating their policy logic.
  • Keep press selftest as an installed-wheel smoke command calling reusable lightweight contract functions that do not require pytest at runtime.
  • Provide typed helpers for active return-value, exception, diagnostic, filesystem, and subprocess assertions.
  • Isolate BOOK_ROOT, cwd, caches, environment variables, and generated files in every test.
  • CI reports test, lint, typing, and integration failures as distinct gates.
  • Document local commands for each layer and for the complete suite.

Program relationship

This is the foundation issue for native milestone v1.12 — Trust foundations. Later issues may depend on its directory layout and support APIs, but it must remain useful and mergeable on its own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ci-cdGitHub Actions, releases, and toolchain imagesarea:dxContributor tooling, tests, maintainability, and development workflowarea:verificationExecutable contracts and artifact verificationaudit-3Findings from audit round 3enhancementNew feature or requestpriority:P1High: required for a trustworthy supported workflowtest-layer:L0Invariant inventory and collection-time contract gates

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions