doctest and unittest

Python includes a couple of built-in modules for testing your code. They two methods are called doctest and unittest. We will look at how to use doctest first and in the second section we will introduce unit tests using Test Driven Development techniques.

Get hands-on with 1200+ tech skills courses.