Testing

Reference

  • assert is a keyword that halts code execution when its argument is false
  • Exceptions are customizeable cousin of assertions.
  • try is a keyword that guards a piece of code which may throw an exception.
  • except is a keyword used to catch and carefully handle that exception
  • nose is a python package with useful assertions and unit test utilities
  • nosetests is a command-line program that collects and runs unit tests.
  • Unit Tests investigate the behavior of units of code (such as functions, classes, or data structures).
  • Regression Tests defend against new bugs, or regressions, which might appear due to new software and updates.
  • Integration Tests check that various pieces of the software work together as expected.
  • Continuous Integration automates the building and testing process accross platforms.
  • Test-driven Development is a software development strategy in which the tests are written before the code.