Mathew K Analytics

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.

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

All 18 lessons

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

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

📓 Notebook · pytest

pytest Tutorial #2: Fixtures Basics
Lesson 2

pytest Tutorial #2: Fixtures Basics

📓 Notebook · pytest

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

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

📓 Notebook · pytest

pytest Tutorial #4: Mocking & Monkeypatch
Lesson 4

pytest Tutorial #4: Mocking & Monkeypatch

📓 Notebook · unittest · pytest · datetime

pytest Tutorial #5: Markers — Organising and Selecting Tests
Lesson 5

pytest Tutorial #5: Markers — Organising and Selecting Tests

📓 Notebook · pytest

pytest Tutorial #6: Assertions Deep Dive
Lesson 6

pytest Tutorial #6: Assertions Deep Dive

📓 Notebook · pytest

pytest Tutorial #7: conftest.py & Sharing Fixtures
Lesson 7

pytest Tutorial #7: conftest.py & Sharing Fixtures

📓 Notebook · pytest

pytest Tutorial #8: Fixture Scopes & Finalisation
Lesson 8

pytest Tutorial #8: Fixture Scopes & Finalisation

📓 Notebook · pytest

pytest Tutorial #9: Test Organisation That Scales
Lesson 9

pytest Tutorial #9: Test Organisation That Scales

📓 Notebook · pytest

pytest Tutorial #10: Parametrised & Indirect Fixtures
Lesson 10

pytest Tutorial #10: Parametrised & Indirect Fixtures

📓 Notebook · pytest

pytest Tutorial #11: Plugins — Extending pytest
Lesson 11

pytest Tutorial #11: Plugins — Extending pytest

📓 Notebook · pytest

pytest Tutorial #12: Coverage with pytest-cov
Lesson 12

pytest Tutorial #12: Coverage with pytest-cov

📓 Notebook · pytest

pytest Tutorial #13: Temporary Files & Directories
Lesson 13

pytest Tutorial #13: Temporary Files & Directories

📓 Notebook · pytest · JSON

pytest Tutorial #14: Capturing Output & Logs
Lesson 14

pytest Tutorial #14: Capturing Output & Logs

📓 Notebook · logging · pytest

pytest Tutorial #15: Parallel Testing with pytest-xdist
Lesson 15

pytest Tutorial #15: Parallel Testing with pytest-xdist

📓 Notebook · pytest

pytest Tutorial #16: Testing Exceptions & Warnings
Lesson 16

pytest Tutorial #16: Testing Exceptions & Warnings

📓 Notebook · pytest

pytest Tutorial #17: CI Integration & Configuration
Lesson 17

pytest Tutorial #17: CI Integration & Configuration

📓 Notebook · pytest

pytest Tutorial #18: Capstone — Testing a Real Package End to End
Lesson 18

pytest Tutorial #18: Capstone — Testing a Real Package End to End

📓 Notebook · pytest · JSON · logging

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.