Testing

Basically, a distinction is made between static and dynamic test procedures.

Static test procedures

are used to check the source code, but it’s not executed. They are divided into

Dynamic testing

are used to find errors when executing the source code. A distinction is made between whitebox and backbox tests.

Whitebox tests

are developed with knowledge of the source code and the software structure. In Python, various modules are available:

Unittest

supports you in automating tests.

Mock

allows you to create and use mock objects.

Doctest

allows you to test tests written in Python docstrings.

tox

allows you to test in different environments.

Blackbox tests

are developed without knowledge of the source code. In addition to Unittest, Hypothesis can also be used in Python for such tests.