Learnixo
All Courses
Python TestingBeginner → AdvancedNEW

pytest: Testing Python Pipelines

Master pytest for data engineering — test discovery, fixtures, parametrize, mocking, pipeline testing with pandas DataFrames, CLI tools, FastAPI endpoints, and real database tests with Testcontainers.

4.9rating0 students3h 20m total4 lessons

What you'll learn

Configure pytest with pyproject.toml, markers, and selective test runs
Write fixtures with function/module/session scope and yield for setup/teardown
Parametrize tests to cover edge cases without duplication
Mock Snowflake connections, S3 uploads, HTTP APIs, and datetime safely
Test pandas DataFrames and pipeline transformations with assert_frame_equal
Test CLI tools with Typer CliRunner and FastAPI endpoints with TestClient
Run real PostgreSQL integration tests with testcontainers-python
Enforce coverage thresholds in GitHub Actions CI

Final Project

Build a complete test suite for a data pipeline: unit tests, parametrized edge cases, mocked external services, and real database integration tests

Curriculum

4 lessons · 3h 20m

Course Info

Lessons4 lessons
Total time3h 20m
LevelBeginner → Advanced
Students0
Rating4.9 / 5.0
Start Course — Free