5 lessons, in order. Each one runs in the editor above; for the concepts behind them, read the pytest guide.
Writing basic testsWrite tests with assert and understand the pytest collection rules.
fixture & parametrizeReuse common setup with @pytest.fixture and test many inputs with @pytest.mark.parametrize.
Mocks & dependency injectionIsolate unit tests by mocking external dependencies (API, DB) with unittest.mock.
TDD β functional programmingDevelop a shopping cart feature through the Red-Green-Refactor cycle of Test-Driven Development.
Advanced. Real-world input validation and result contractsEven in browser lab code, separating input validation, success responses, and error responses makes it easy to grow into real API/batch code.