PyCharm: Keep Your AI Coding Agent on a Short Leash with TDD

Wait 5 sec.

While you were off getting a coffee, your agent wrote 300 lines of Python. Are you really going to read them all?If you answered, “not really,” then you’re in good company (including mine). Agents can now write code faster than any of us can (or want to) review it, and this leaves a lot of us with the uncomfortable feeling that the codebase is moving faster than our understanding of it. However, I don’t think the answer is to stop using agents. It’s working out how to know whether the code is right, before you even type in the first prompt.Join Reuven Lerner and me on December 2 for a live session on how to do exactly that with test-driven development (TDD), PyCharm, and JetBrains Air.Date: December 2, 2026Time: 5:30 pm UTC (6:30 pm CET / 12:30 pm EST) Register now! How can TDD help us tame agent-written code?Our old friend TDD is not just good for code we write ourselves. It allows us to define what correct looks like upfront, then let the agents work backwards towards this goal. This narrows the scope of the problem the agent is solving, as well as giving us an automated check as to whether the code solves it. Reuven will show us how to use TDD in a disciplined workflow, where near-100% test coverage makes sure that almost every line of agent-written code is exercised by a test. Moreover, he’ll show us how to incorporate tools like static type checking to quickly and deterministically catch mismatched types before the code runs.What we’ll cover, and why you should join usIn this stream, we’ll:Write a test first, using PyCharm’s pytest support.Hand the task to an agent of your choice using JetBrains Air, then review its implementation and flag anything that doesn’t look right.Use PyCharm’s inbuilt inspections, test runner and debugger to diagnose what went wrong, and fix it.You’ll leave with a repeatable workflow for getting the speed of an agent without giving up confidence in your code. This is aimed at all Python developers and data scientists, whether you’re already coding with agents or still deciding whether you can trust them.Bring your questions about testing, agents, and how to keep both in check. We’ll answer them live during the stream.About the speakersReuven LernerReuven Lerner is a full-time Python trainer, teaching at companies around the world and via his LernerPython online platform. He publishes both Better Developers (about Python) and Bamboo Weekly (Pandas puzzles based on current events). His most recent book is AI-Assisted Python for Nonprogrammers (O’Reilly). He previously wrote Python Workout and Pandas Workout (Manning).Jodie BurchellDr. Jodie Burchell is Python Advocacy Team Lead at JetBrains and was previously a Lead Data Scientist at Verve Group Europe. She completed a PhD in clinical psychology and a postdoc in biostatistics before leaving academia for a data science career.