Test suites are one of the most important modern tools for developers to write robust code that can be easily optimized, extended, and maintained. Testing is fundamental when writing scientific code for research or scientific applications, where the final outcome (and its consequences) depends crucially on the correctness of the underlying algorithms. In this tutorial, I will give a practical review of the main ideas, patterns, and tools behind testing scientific code with Python.
- Intro: Scientific development and testing
- The basic agile development cycle
- Core ideas in testing: test units, fixtures, mock objects, coverage
- Testing patterns for scientific development
- Testing tools in Python (unittest, nosetest, coverage, mock)
- Many demos, examples, and anecdotes!