Testing Strategies — Video Resources¶
Best Single Video¶
How To Write Unit Tests For Existing Python Code (Part 1) by ArjanCodes (~25 min) Why: Shows the real-world challenge of adding tests to code that was not designed for testing. Covers mocking, patching, and writing tests without modifying the original implementation. Practical, not theoretical, and immediately applicable to your own projects.
Alternatives¶
- Python Tutorial: Unit Testing Your Code with the unittest Module by Corey Schafer (~39 min) — The classic introduction to Python's built-in unittest module. Covers test structure, assertions, setUp/tearDown, and mocking. A thorough foundation before moving to pytest.
- How To Write Unit Tests For Existing Python Code (Part 2) by ArjanCodes (~22 min) — The follow-up that shows how refactoring code to improve testability also improves the overall design. Demonstrates the symbiotic relationship between clean architecture and easy testing.
Deep Dives¶
- Python API Development - Comprehensive Course for Beginners by freeCodeCamp / Sanjeev Thiyagarajan (~19 hrs) — Includes a substantial section on testing with pytest in a real application context: fixtures, parametrize, database testing, and CI/CD integration. Watch the testing chapters (around hour 14-17) for an advanced, production-oriented approach.
Last verified: February 2026