Skip to content

Add safe pytest migration essentials for v0.2.0 - #10

Merged
polishdataengineer merged 1 commit into
mainfrom
agent/pytest-migration-essentials
Jul 20, 2026
Merged

Add safe pytest migration essentials for v0.2.0#10
polishdataengineer merged 1 commit into
mainfrom
agent/pytest-migration-essentials

Conversation

@polishdataengineer

Copy link
Copy Markdown
Owner

Summary

  • prepare Testenix 0.2.0 with native tmp_path, transactional monkeypatch, and autouse fixtures
  • extend safe pytest migration to simple test classes, bare pytest.mark.asyncio, and statically provable local monkeypatch helpers
  • preserve pytest-asyncio's default function-scoped loop lifecycle with an isolated asyncio.Runner per test or case
  • fail closed on unsupported monkeypatch flows, class lifecycle, async configuration, custom loop policies, and ambiguous pytest config
  • make migration summaries honest and compact while retaining complete JSON diagnostics
  • update README, GitHub Pages content, changelog, CLI reference, roadmap, and LLM-ready documentation

Why

A real 118-test pytest suite was initially blocked by 161 unsupported constructs, mostly async markers, autouse fixtures, simple classes, tmp_path, and monkeypatch. Supporting those constructs safely requires native runtime equivalents and semantic guards; simply stripping pytest markers would change event-loop and fixture behavior.

User impact

Existing pytest sources remain untouched. testenix migrate pytest ... --check now converts the supported subset in private staging, compares source, native serial, and native parallel outcomes, and leaves the destination absent unless publication is explicitly requested and every gate passes.

Validation

  • 284 passed
  • Ruff check and format: clean
  • mypy and pyright: clean
  • generated docs check and Sphinx -W: clean
  • lockfile check: clean
  • wheel and sdist built as testenix 0.2.0
  • Twine strict and wheel-content checks: clean
  • isolated wheel/sdist smoke tests and migration examples: passed
  • real project: 118/118 passed under pytest, native serial, and native 4-worker validation; originals unchanged and check output absent
  • independent multi-agent re-audit: no release blockers

The observed real-project validation timings were 3.120 s (pytest), 2.870 s (native serial), and 2.423 s (native parallel). These are validation timings, not a multi-round benchmark claim.

@polishdataengineer
polishdataengineer marked this pull request as ready for review July 20, 2026 21:26
@polishdataengineer
polishdataengineer merged commit 0f39289 into main Jul 20, 2026
15 checks passed
@polishdataengineer
polishdataengineer deleted the agent/pytest-migration-essentials branch July 20, 2026 21:26
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