Module 11 of 11

Testing, Debugging & Concurrency

Lessons

About This Module

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.

Lessons

3 videos
01

Unit Testing Your Code with the unittest Module

Writing automated tests with unittest — TestCase classes, assertions, setUp/tearDown — so you can catch bugs before they reach production.

02

Run Code Concurrently Using the Threading Module

Using the threading module to run multiple tasks concurrently — handy for I/O-bound work like downloads and network requests.

03

Run Code in Parallel Using the Multiprocessing Module

Using the multiprocessing module to run CPU-bound tasks in parallel across multiple cores, sidestepping the GIL.