Premium Only Content

Understand Python unit tests in 5 minutes
In this video I show you an overview of unit tests in Python: what they are, how they work and how to write effective ones by looking at real world examples.
Links:
- Python 3 documentation for unit tests: https://docs.python.org/3/library/unittest.html
- md-toc: https://github.com/frnmst/md-toc/
CHAPTERS
0:00 Intro
0:08 Brief explanation
0:51 Steps to setup unit tests
1:12 Directory structure
1:22 tests.py file structure: unittest module, inherited classes, test_ methods
2:27 The strcmp_a function example
2:46 strcmp_a unit tests explained in detail
3:25 Running the tests
3:30 Setting a wrong value in a unit test on purpose to see what happens
3:40 The _replace_string function in md-toc
4:09 _replace_string unit tests
4:33 Running all tests in md-toc
4:53 Lines of code of unit tests compared to the rest of the code in md-toc
5:07 Outtro
#unittests #python #mdtoc
-
39:45
Kimberly Guilfoyle
2 hours agoCharlie's Legacy and Our Mission | Ep.253
12.3K10 -
10:06
Tundra Tactical
2 hours agoWhats The Deal With New Guns In 2025 Part 2
81 -
LIVE
The Amber May Show
4 hours agoCharlie Kirk Murder Probe EXPLODES | FBI, FEMA, & SCOTUS Shake the Nation
149 watching -
1:14:55
vivafrei
5 hours agoJD Vance Pays Tribute to Charlie Kirk; Ryan Routh Trial Continues! And More!
168K98 -
LIVE
Dr Disrespect
7 hours ago🔴LIVE - DR DISRESPECT - WARZONE - PROTECT THE DOC
1,037 watching -
LIVE
LFA TV
20 hours agoLFA TV ALL DAY STREAM - MONDAY 9/15/25
1,180 watching -
29:05
Athlete & Artist Show
6 hours ago $0.26 earned1st Line Minutes at 35, Slovenian Sports Fans, and MORE
15.3K -
LIVE
freecastle
6 hours agoTAKE UP YOUR CROSS- Our Battles, HE Has Already Won!
108 watching -
1:37:05
The Quartering
6 hours agoCharlie Kirk Assassination FBI Coverup, Liberals Getting Fired & Massive Vigils!
212K85 -
1:46:00
The Michelle Moore Show
20 hours ago'The Spiritual Battle Has Escalated...Are Patriots Being Baited For Civil War?' Guest, Lt. Mark Taylor: The Michelle Moore Show (Sept 15, 2025)
21.4K28