Python logo

Table of Contents

  • unittest — Unit testing framework
    • Basic example
    • Command-Line Interface
      • Command-line options
    • Test Discovery
    • Organizing test code
    • Re-using old test code
    • Skipping tests and expected failures
    • Distinguishing test iterations using subtests
    • Classes and functions
      • Test cases
      • Grouping tests
      • Loading and running tests
        • load_tests Protocol
    • Class and Module Fixtures
      • setUpClass and tearDownClass
      • setUpModule and tearDownModule
    • Signal Handling

Previous topic

doctest — Test interactive Python examples

Next topic

unittest.mock — mock object library