The final module of the course is about writing code you can trust and code that runs fast. That means proving your code works with automated tests, tracking down the inevitable bugs, and knowing how to run work concurrently when a single thread isn't enough.
It starts with testing and debugging: writing
automated tests with the unittest module so you can
catch problems before they reach production, and building the
habits that make bugs faster to find and fix. From there it
covers concurrency, using the
threading module to run I/O-bound tasks at the same
time and the multiprocessing module to run
CPU-bound tasks in parallel across multiple cores.
Watch the lessons in order — this is the last module before the course's hands-on Projects.
Writing automated tests with unittest — TestCase classes, assertions, setUp/tearDown — so you can catch bugs before they reach production.
Using the threading module to run multiple tasks concurrently — handy for I/O-bound work like downloads and network requests.
Using the multiprocessing module to run CPU-bound tasks in parallel across multiple cores, sidestepping the GIL.