Add test cases for a feature change in legacy Python
The poster asked Claude Code to write test cases for a feature change in a legacy Python SaaS codebase.
Done withClaude Code
- What they did
- The poster used Claude Code on a legacy Python SaaS codebase after making a feature change and asked it to add tests. They explicitly named which API client methods to mock and told it to compare full expected output structures, but the agent still mocked extra methods, reverted to element-by-element assertions in later tests, and only fixed some missed call-check cases after the poster pointed them out.
- How it went
- The outcome was underwhelming: the poster said it felt no better than Cursor or JetBrains' assistant, and in some ways less consistent and reliable. No performance gains or successful test metrics were given.
- Worth knowing
- A key catch was plan and model limits in comments: several replies said better results required Plan Mode or higher-tier Opus access, while the poster had signed up to Pro.
Try it yourself with Claude Code
In this codebase, I am changing [feature or behavior] in [file or module]. First read the existing code and any existing tests to learn the conventions, then write test cases covering the new behavior, edge cases, and anything the change might break. Run the test suite and report which tests pass and fail. Do not modify the application code without showing me the change first.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: Reddit · Undated
Related use cases
Turn tickets into merged pull requests
Pulls tasks from GitHub Issues or Linear, then runs Claude Code or Codex in isolated Kubernetes pods to carry each one through to a PR.
Run an entire business from the terminal with Claude Code
Poster built a system that runs their whole business through Claude Code instead of Claude.ai; the specific tasks aren't detailed in the snippet.
Track daily AI dev tool releases and build project toolkits
Built with Claude Code, a tool scrapes sources around the clock, classifies finds with AI, scores legitimacy, and generates a project toolkit with a CLAUDE.md.
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Use a bot as a QA intern on a live app
A Grok Bot clicked through an app's core flows several times a day, reported problems and drafted fix PRs; it found a real bug.
Turn an open GitHub issue into a PR with a background agent
A developer pointed a Cursor background agent at an open issue in a Terraform repo; it opened a PR in about 3 minutes, though the PR description and title needed fixing.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.