Pytest deep dive
A free 18-lesson course. Every lesson has a video walkthrough and a Jupyter notebook you can download or open in Google Colab. Tools covered: pytest, JSON, logging, unittest, datetime.
- Lessons18
- LevelIntermediate
- PriceFree
About this course
Pytest deep dive is a free intermediate course with 18 video lessons. It starts with “pytest Tutorial #1: Getting Started — Your First Python Test” and finishes with “pytest Tutorial #18: Capstone — Testing a Real Package End to End”. Every lesson comes with the exact Jupyter notebook used in the video, so you can run every step yourself.
Along the way you'll use pytest, JSON, logging, unittest and datetime.
It suits learners who already know basic Python (variables, lists, loops and functions) and want to apply it to real problems.
Course outline
- pytest Tutorial #1: Getting Started — Your First Python Test – On testing real Python code with pytest. Test discovery, plain assert statements, and actually running pytest. Let's get into it. pytest…
- pytest Tutorial #3: Parametrize — Many Cases, One Test – On testing real Python code with pytest. @pytest.mark.parametrize: real one test function, many real input cases. Let's get into it.…
- pytest Tutorial #5: Markers — Organising and Selecting Tests – On testing real Python code with pytest. skip, skipif, xfail, and defining custom markers. Let's get into it. @pytest.mark.skip…
- pytest Tutorial #7: conftest.py & Sharing Fixtures – On testing real Python code with pytest. conftest.py: real shared fixtures, no imports required, plus autouse. Let's get into it.…
- pytest Tutorial #9: Test Organisation That Scales – On testing real Python code with pytest. Test classes, the init gotcha, and xunit-style setup and teardown. Let's get into it. A class…
- pytest Tutorial #11: Plugins — Extending pytest – On testing real Python code with pytest. pytest-mock, pytest-cov, and pytest-xdist: three real popular plugins. Let's get into it. A…
- pytest Tutorial #13: Temporary Files & Directories – On testing real Python code with pytest. tmppath and tmppathfactory: real disk-backed scratch space, auto-cleaned. Let's get into it.…
- pytest Tutorial #15: Parallel Testing with pytest-xdist – On testing real Python code with pytest. -n auto, the session-scope-per-worker gotcha, --dist loadscope, and real measured speedup. Let's…
All 18 lessons

pytest Tutorial #1: Getting Started — Your First Python Test

pytest Tutorial #2: Fixtures Basics

pytest Tutorial #3: Parametrize — Many Cases, One Test

pytest Tutorial #4: Mocking & Monkeypatch

pytest Tutorial #5: Markers — Organising and Selecting Tests

pytest Tutorial #6: Assertions Deep Dive

pytest Tutorial #7: conftest.py & Sharing Fixtures

pytest Tutorial #8: Fixture Scopes & Finalisation

pytest Tutorial #9: Test Organisation That Scales

pytest Tutorial #10: Parametrised & Indirect Fixtures

pytest Tutorial #11: Plugins — Extending pytest

pytest Tutorial #12: Coverage with pytest-cov

pytest Tutorial #13: Temporary Files & Directories

pytest Tutorial #14: Capturing Output & Logs

pytest Tutorial #15: Parallel Testing with pytest-xdist

pytest Tutorial #16: Testing Exceptions & Warnings

pytest Tutorial #17: CI Integration & Configuration

pytest Tutorial #18: Capstone — Testing a Real Package End to End
Frequently asked questions
Is the Pytest deep dive course free?
Yes. All 18 videos, notebooks are free, with no sign-up.
Do I need to install anything?
No. You can open each notebook in Google Colab in your browser, or download it and run it in Jupyter or VS Code with Anaconda installed.
How long does the Pytest deep dive course take?
Most learners take one to two lessons a day, so plan on 3 to 4 weeks if you code along.
What level is it?
Intermediate. It suits learners who already know basic Python (variables, lists, loops and functions) and want to apply it to real problems.