How to Write Great Unit Tests in Python
Check out https://www.squarespace.com/arjancodes to save 10% off your first purchase of a website or domain using code ARJANCODES. Want to learn how to write professional, maintainable unit tests in Python? In this video, I’ll walk you through the entire process using a realistic WeatherService example—from basic testing principles to powerful pytest features like monkey patching, mocking, fixtures, and parametrization. 💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. 🔥 GitHub Repository: https://git.arjan.codes/2025/testtips. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. 🔖 Chapters: 0:00 Intro 1:01 The Basics of Unit Testing 3:45 Monkey Patching 8:51 Mocking vs. Monkey Patching 12:20 Using Fixtures 14:01 Refactor for Testability 16:39 Neat Pytest Features 19:59 Best Practices for Writing Unit Tests 22:20 Final Thoughts #arjancodes #softwaredesign #python

I Tried SOLID Principles in Python… Here’s What Happened

Please Learn How To Write Tests in Python… • Pytest Tutorial

How To Write Unit Tests For Existing Python Code // Part 1 of 2

CLAUDE CODE ADVANCED FULL COURSE (3 HOURS)

Introduction to Microsoft Agent Framework | Build AI Agents in .NET

Software Testing Theory + A Few Less Obvious Testing Techniques

Protocols vs ABCs in Python - When to Use Which One?

Open Models Coding Essentials – Running LLMs Locally and in the Cloud Course

Test-Driven Development In Python // The Power of Red-Green-Refactor

How To Write Unit Tests in Python • Pytest Tutorial

What Most Python Developers Miss About Generators

Python Project | Python Projects For Beginners | Python Project Tutorial | Intellipaat

RL for Agents Workshop - Deep Dive on Training Agents with RL and Open Source

n8n Course for Beginners – Build Complex Workflows & Master AI Integration

Full Archon Guide - Build AI Coding Harnesses That Actually Ship (LIVE)

Mastering API Testing with FastAPI: Databases, Dependencies, and More!

Pytest Tutorial – How to Test Python Code

Why Your Code Isn’t Pythonic (And How to Fix It)

Building an AI Dark Factory: A Codebase That Writes Its Own Code, Live

