Skip to content

Sample code for: Generating Python Tests With AI: A Suite You Can Trust - #866

Open
lpozo wants to merge 4 commits into
masterfrom
ai-python-test-generation
Open

lpozo wants to merge 4 commits into
masterfrom
ai-python-test-generation

Conversation

@lpozo

@lpozo lpozo commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Where to put new files:

  • New files should go into a top-level subfolder, named after the article slug. For example: my-awesome-article

How to merge your changes:

  1. Make sure the CI code style tests all pass (+ run the automatic code formatter if necessary).
  2. Find an RP Team member on Slack and ask them to review & approve your PR.
  3. Once the PR has one positive ("approved") review, GitHub lets you merge the PR.
  4. 🎉

Code examples for the Generating Python Tests With AI: A Suite You Can Trust tutorial. Files live in the ai-python-test-generation/ top-level folder, named after the article slug.

The folder contains the finished bookstore-project from the tutorial:

  • The bookstore package (pricing, catalog, inventory) and its FastAPI app
  • CLAUDE.md with the testing conventions from Step 1
  • BEHAVIOR.md with the reviewed behavior tables from Step 2
  • tests/ with the generated suite from Steps 3 and 4

Verified locally: 75 tests pass, branch coverage is 100% on every module, and mutmut 3.7.0 kills all 146 mutants.

Prepared with the post-materials workflow, then verified locally before pushing.

🤖 Generated with Claude Code

lpozo and others added 4 commits September 28, 2026 12:05
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Align BEHAVIOR.md with the template and match the full message in the
missing-file catalog test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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