Skip to content

Add advanced pytest chapter - #76

Merged
RamonRDR merged 1 commit into
mainfrom
phase-09-pytest-testing-contracts
Aug 30, 2026
Merged

Add advanced pytest chapter#76
RamonRDR merged 1 commit into
mainfrom
phase-09-pytest-testing-contracts

Conversation

@RamonRDR

@RamonRDR RamonRDR commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • add Phase 9 · Chapter 04, Engineering Automated Tests with pytest, in English, Brazilian Portuguese, and Spanish
  • target the current stable pytest 9.1.x series and validate against pytest 9.1.1
  • extend requirements-external.txt with pytest>=9.1,<9.2
  • cover discovery/collection, assertion introspection, pytest.approx, exceptions, warnings, parametrization, fixtures/scopes/teardown, conftest.py, tmp_path, monkeypatch, test doubles, capsys, capfd, caplog, custom marks, strictness, skip/xfail, test selection, configuration, suite architecture, deterministic isolation, flakiness, coverage boundaries, plugins, unittest interoperability, and CI exit-code contracts
  • add five deterministic executable examples that invoke the real pytest runner programmatically without external services or persistent test artifacts
  • synchronize Phase 9 navigation, localized status documents, roadmaps, learning paths, project-structure docs, the requests → pytest handoff, and the approved-example manifest
  • mark Phase 9: External Libraries complete, with Phase 10: Practical Projects planned next

Chapter shape

  • 97 numbered sections per language
  • 32 fenced Python blocks, byte-identical across EN / PT-BR / ES
  • estimated study time: 300–390 minutes
  • five new executable examples:
    • assertions_and_parametrize.py
    • fixtures_and_tmp_path.py
    • monkeypatch_environment.py
    • exceptions_and_warnings.py
    • capture_output_and_logs.py

Dependency contract

  • pandas>=3.0,<3.1
  • openpyxl>=3.1,<3.2
  • requests>=2.34,<2.35
  • pytest>=9.1,<9.2
  • pytest 9.1.1 requires Python 3.10+
  • repository validation continues on Python 3.13

Validation

  • branch is based exactly on main at e4eaca97334967bc35e155c2ff491f2f7ba2594e
  • final clean HEAD: 2216a19542082d147e3e8e244ef96dab58482889
  • one focused commit, 28 changed files
  • CPython 3.13.15
  • pandas 3.0.5
  • openpyxl 3.1.5
  • Requests 2.34.2
  • pytest 9.1.1
  • all 32 fenced Python blocks are identical across EN / PT-BR / ES
  • all three chapters contain exactly 97 numbered sections
  • all 11 repository quality-script tests passed via unittest
  • the same 11 repository tests also passed under pytest
  • all 176 approved Python examples passed
  • exact output of all five pytest examples passed
  • 2,316 internal links across 235 Markdown files passed
  • repository structure validation passed
  • git diff --check passed
  • temporary synchronization script and validation workflow were removed before the clean final commit
  • pre-PR validation workflow passed: run 33281547105
  • official PR Repository quality checks run #509 passed on the exact final HEAD

Review

  • @codex review completed on 2216a19542
  • Codex result: Didn't find any major issues
  • no inline review threads are open

References

Primary references are the current pytest documentation, how-to guides, API reference, changelog, and PyPI metadata. Version-sensitive pytest 9.1 behavior and the unreleased 9.2 boundary are documented explicitly.

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 2216a19542

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@RamonRDR
RamonRDR merged commit 6dcbe56 into main Aug 30, 2026
1 check passed
@RamonRDR
RamonRDR deleted the phase-09-pytest-testing-contracts branch August 30, 2026 00:05
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