Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Testing with unittest

Python comes with the unittest library. It is a simple testing framework and despite its name it can be used for any form of functional tests. Not just unittest.

It is also not very popular any more, but you might encounter it in various places, so it is a good idea to a take a quick look at it.

Unittests are real code, not just documentation. They are usually stored in separate files.

The names of these files usually start with the word test_.