What happens when you run manage.py test ?
summary
Examines Django's test lifecycle step by step: create test databases, migrate, run system checks, load and run tests, report results, destroy databases, showing where unittest and Django hand off work. Builds two concrete customizations: a trivial fast runner that subclasses discover runner and always returns an A plus, and an output changer that subclasses unittest's text result to produce emoji test result output; both run and the emoji output works. Contrasts this with pytest hooks (20+ hooks, ~700 plugins) as a more composable alternative.
AI-written summary · about
chapters (5)
- 0:00Start
- 2:41Dissecting a Test Run
- 7:49test management command
- 9:04DiscoverRunner class
- 16:55Superfast Runner Custom test runner
related talks
49mKeynote - Testing in Django
24mPractical Unit Testing in Django
26mDjango migrations, friend or foe? Optimize them for testing
35mTurning test writing into a consistently brief and pleasant experience
32mEasy, Breezy, Beautiful... Django Unit Tests with Colleen Dunlap
27mHow a Solo Hobbyist Learned to Love Testing
53mDjango productivity tips and tricks
28m"WHAT IS THIS MESS?" - Writing tests for pre-existing code bases
