High-Value Python Unit Tests That Keep AI from Breaking Your Code
Details
This presentation explores how to write high-value unit tests in Python with PyTest, treating testing as both a core engineering practice and a practical safeguard for AI-assisted development. On the engineering side, the session covers the standard reasons teams invest in good tests: catching regressions early, supporting safe refactoring, documenting expected behavior, and increasing confidence in code changes. On the AI side, it shows how strong tests reduce the risk of AI coding tools introducing subtle bugs, changing behavior unintentionally, or producing code that only looks correct. The talk focuses on writing tests that are clear, fast, isolated, and meaningful, using PyTest features such as expressive assertions, fixtures, and parametrization. It also emphasizes that developers should not only write good tests themselves, but also instruct AI tools to generate tests with the same quality bar. The goal is to show that well-designed tests serve two equally important purposes: they improve software quality in the usual ways, and they act as guardrails that make AI-generated code safer to use.
#VegasTech

