Learn unittest with free notebooks
3 free video lessons that use unittest, each with a downloadable Jupyter notebook and, where needed, the dataset. Learn unittest by working through real examples.
About these unittest lessons
These 3 lessons come from 3 different courses, so you see unittest used in several settings. The course with the most unittest lessons is Python for Data Analysts (1 lessons).
unittest is most often used here together with datetime, regex (re) and pytest.
Watch the video, then run the notebook yourself: changing the code and re-running it is the fastest way to learn.
Courses that use unittest
- Python for Data Analysts – 1 lesson
- Python standard library deep dive – 1 lesson
- Pytest deep dive – 1 lesson
1 h 3 minPython Zero to Hero: The Complete Beginner-to-Advanced Course
18 minPython unittest Explained: Write Tests That Catch Bugs | Standard Library #20

pytest Tutorial #4: Mocking & Monkeypatch
Frequently asked questions
Where should I start learning unittest?
Start with “Python Zero to Hero: The Complete Beginner-to-Advanced Course”, then work through the Python for Data Analysts course.
Are these unittest lessons free?
Yes. Every video, notebook and dataset on this site is free to use for learning.
Can I run the unittest notebooks without installing Python?
Yes. Open them in Google Colab, or use the Run in browser button where a lesson has one.