Technical AIintermediateVideo + quiz

Test Python Code with pytest and an AI Pair

Write pytest tests that catch real bugs in Python code, and use an AI assistant without trusting it blindly.

19 lessons · 49 min
Watch the first lesson freeWelcome: Eldergrove Press and the code nobody tests · 3 min

Sign in to watch one lesson from this course free.

What you will be able to do

Write, run and read pytest tests, with fixtures and parametrised casesIsolate code from files, settings, clocks and model APIs with fakes and patchesBrief an AI assistant to draft tests from behaviour, then reject the weak onesProve a suite has teeth by breaking the code on purpose and reading coverage

Skills you will gain

  • Writing pytest tests
  • Fixtures and conftest.py
  • Parametrized boundary tests
  • Mocks, fakes and monkeypatch
  • Testing code that calls a model API
  • Briefing an AI to write tests
  • Test-first bug fixing
  • Coverage and mutation by hand

About this course

Write pytest tests that catch real bugs in Python code, and use an AI assistant without trusting it blindly. You write and read tests and failures, share setup with fixtures, cover every boundary with parametrize, keep files, settings, mail and model APIs out of unit tests with fakes and patches, brief an assistant to draft tests from the rules, fix bugs test first, and prove your tests can fail with deliberate breakage and coverage. Free and local, with pytest 9.

Technical AI

Curriculum

7 modules · 19 lessons · 49m

Requirements

Python functions, imports and modules
How to run a command in a terminal
Python 3.10 or newer, and pytest 9
Optional: a free Groq key, or the mock
The assistant drafts the tests
You prove each one can fail

What you walk away with

A Yallo AI Academy certificate of completion, issued when every lesson is complete and the final assessment is passed at 70% or aboveA public verification page, so a stranger can check the certificate without asking you for a filePDF download, and a one-click share to your LinkedIn profile

Yallo AI Academy certifies completion of

Test Python Code with pytest and an AI Pair