Skip to content

Reference: Unit testing

Quick-lookup pages. Short, dense, and designed to skim — the sort of thing you keep a tab open on while you're writing tests. If you're here to learn the topic for the first time, start with Learn instead.

Pages in this section

  • unittest quick referenceTestCase, setUp/tearDown, the runner, and how the moving parts fit together.
  • Assertions — the full list of assertX methods, with what each one checks and when to prefer it.
  • Test naming conventions — file, class, and method naming patterns that the discovery machinery expects.