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
-
47:05
Athlete & Artist Show
10 days ago $0.67 earnedHIGH STAKES w/ Former Team Canada Gold Medalist
14.7K -
2:53
GreenMan Studio
15 hours agoGREENMANS STOCKING STUFFERS 2 – GRIMMS CAMPING SUPPLIES
14.3K4 -
42:06
Rpurham
21 hours agoSpecial guest: Sam Anthony, CEO & Founder, [your] News
14.4K -
15:23
Standpoint with Gabe Groisman
19 hours agoDual Citizenship Coming to an End? US Senator Bernie Moreno
100K26 -
1:22:19
FreshandFit
13 hours agoGirls Try To Get 60 Year Old Granny To Do OF
372K142 -
3:05:53
Decoy
13 hours agoNobody is talking about this..
102K28 -
1:57:00
Badlands Media
19 hours agoBaseless Conspiracies Ep. 163: False Memories, MKUltra & the Machinery of Disbelief
95.2K27 -
5:34:44
Drew Hernandez
1 day agoERIKA KIRK & CANDACE OWENS CEASEFIRE SUMMIT?
61K36 -
1:37:33
efenigson
21 hours agoUnapologetically Yourself: The Courage to Speak & Be Different - Zuby | Ep. 111
73K9 -
1:07:27
Inverted World Live
12 hours agoAI Person of the Year & Robot Wolves in Japan | Ep. 153
98.6K12