Unit Testing with Generative AI Case Study
Follow one small Python class, a rolling buffer of wind readings, from the first prompt to a finished pytest suite. Brief an AI assistant, read its tests critically, break the code on purpose to see what they miss, and use coverage and edge cases to close the gaps.
- Beginner level
- 2 modules
- 4 lessons
- 19 quiz questions
Syllabus
01Asking the Assistant for TestsMeet the class under test, brief an AI assistant with both the code and the rules in words, and read the first batch of pytest tests it hands back.2 lessons
02Judging What the Assistant WroteTest the tests: break the class on purpose to see whether the suite notices, then use coverage numbers and a list of edge cases to find what is still missing.2 lessons