Testing

Table of Contents

We have been covering testing your code as we go along. This page will just provide some relevant links.

Types of testing

We have only focused on unit tests, which isolate a small part of the code (e.g., a single function) and test that it is working as expected. The relationship between unit tests and other types of tests (integration and functional) is described nicely here.

Unit testing frameworks

We have been using pytest. The other popular (and builtin) framework is unittest.

Other links

  • mock - a library that helps you perform isolated unit tests
  • pythontesting.net - good introductions to main testing frameworks
  • nose - test discovery

Released under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Created with Emacs 24.4.1 (Org mode 8.3beta)

Validate